mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-05-25 13:25:28 +00:00
Calendar module optimizations in multidomain setup
This commit is contained in:
@@ -126,11 +126,21 @@
|
||||
|
||||
- (NSString *) currentUserDisplayName
|
||||
{
|
||||
NSDictionary *infos;
|
||||
NSString *uid;
|
||||
SOGoUserManager *um;
|
||||
|
||||
um = [SOGoUserManager sharedUserManager];
|
||||
|
||||
return [um getFullEmailForUID: [self currentUser]];
|
||||
uid = [self currentUser];
|
||||
infos = [um contactInfosForUserWithUIDorEmail: uid inDomain: [[context activeUser] domain]];
|
||||
if (infos)
|
||||
{
|
||||
return [NSString stringWithFormat: @"%@ <%@>",
|
||||
[infos objectForKey: @"cn"],
|
||||
[infos objectForKey: @"c_email"]];
|
||||
}
|
||||
else
|
||||
return uid;
|
||||
}
|
||||
|
||||
- (BOOL) canSubscribeUsers
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
/* UIxUserRightsEditor.m - this file is part of SOGo
|
||||
*
|
||||
* Copyright (C) 2007-2010 Inverse inc.
|
||||
*
|
||||
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
* Copyright (C) 2007-2015 Inverse inc.
|
||||
*
|
||||
* This file is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -20,6 +18,8 @@
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#import <Foundation/NSDictionary.h>
|
||||
|
||||
#import <NGObjWeb/NSException+HTTP.h>
|
||||
#import <NGObjWeb/WOApplication.h>
|
||||
#import <NGObjWeb/WOResponse.h>
|
||||
@@ -86,6 +86,7 @@
|
||||
|
||||
- (NSString *) userDisplayName
|
||||
{
|
||||
NSDictionary *infos;
|
||||
SOGoUserManager *um;
|
||||
|
||||
if ([self userIsAnonymousUser])
|
||||
@@ -99,9 +100,15 @@
|
||||
else
|
||||
{
|
||||
um = [SOGoUserManager sharedUserManager];
|
||||
return [NSString stringWithFormat: @"%@ <%@>",
|
||||
[um getCNForUID: uid],
|
||||
[um getEmailForUID: uid]];
|
||||
infos = [um contactInfosForUserWithUIDorEmail: uid inDomain: [[context activeUser] domain]];
|
||||
if (infos)
|
||||
{
|
||||
return [NSString stringWithFormat: @"%@ <%@>",
|
||||
[infos objectForKey: @"cn"],
|
||||
[infos objectForKey: @"c_email"]];
|
||||
}
|
||||
else
|
||||
return uid;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -300,7 +300,7 @@
|
||||
delegatedAttendee = [iCalPerson new];
|
||||
[delegatedAttendee autorelease];
|
||||
[delegatedAttendee setEmail: delegatedEmail];
|
||||
delegatedUid = [delegatedAttendee uid];
|
||||
delegatedUid = [delegatedAttendee uidInDomain: [user domain]];
|
||||
if (delegatedUid)
|
||||
{
|
||||
SOGoUser *delegatedUser;
|
||||
|
||||
@@ -452,7 +452,7 @@
|
||||
delegatedAttendee = [iCalPerson new];
|
||||
[delegatedAttendee autorelease];
|
||||
[delegatedAttendee setEmail: delegatedEmail];
|
||||
delegatedUid = [delegatedAttendee uid];
|
||||
delegatedUid = [delegatedAttendee uidInDomain: [user domain]];
|
||||
if (delegatedUid)
|
||||
{
|
||||
SOGoUser *delegatedUser;
|
||||
|
||||
Reference in New Issue
Block a user