Calendar module optimizations in multidomain setup

This commit is contained in:
Francis Lachapelle
2015-07-22 16:45:42 -04:00
parent 366ad44cd1
commit 6830d6d930
9 changed files with 69 additions and 36 deletions
+12 -2
View File
@@ -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
+13 -6
View File
@@ -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;
}
}
+1 -1
View File
@@ -300,7 +300,7 @@
delegatedAttendee = [iCalPerson new];
[delegatedAttendee autorelease];
[delegatedAttendee setEmail: delegatedEmail];
delegatedUid = [delegatedAttendee uid];
delegatedUid = [delegatedAttendee uidInDomain: [user domain]];
if (delegatedUid)
{
SOGoUser *delegatedUser;
+1 -1
View File
@@ -452,7 +452,7 @@
delegatedAttendee = [iCalPerson new];
[delegatedAttendee autorelease];
[delegatedAttendee setEmail: delegatedEmail];
delegatedUid = [delegatedAttendee uid];
delegatedUid = [delegatedAttendee uidInDomain: [user domain]];
if (delegatedUid)
{
SOGoUser *delegatedUser;