From 011026910462a4f908d9bf2f0702a5f76698033d Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Tue, 22 May 2007 18:40:05 +0000 Subject: [PATCH] Monotone-Parent: 3c0201014f53f29be70c0414896fda18bebaba81 Monotone-Revision: 89e96558858b2cf13a764624a48709a6ae445040 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2007-05-22T18:40:05 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 4 ++++ UI/Common/UIxUserRightsEditor.h | 1 + UI/Common/UIxUserRightsEditor.m | 12 ++++++++++-- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4c5d7dc53..a66e10574 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2007-05-22 Wolfgang Sourdeau + * UI/Common/UIxUserRightsEditor.m ([UIxUserRightsEditor -userIsDefaultUser]) + ([UIxUserRightsEditor -_initRights]): take the new SOGoObject's + "defaultUserID" method into account. + * UI/MailerUI/UIxMailUserRightsEditor.m: added all the missing methods to support the IMAP acls mentionned in the RFC 4314, removed the ones specific to Cyrus. diff --git a/UI/Common/UIxUserRightsEditor.h b/UI/Common/UIxUserRightsEditor.h index 35cfe1568..0bef18e57 100644 --- a/UI/Common/UIxUserRightsEditor.h +++ b/UI/Common/UIxUserRightsEditor.h @@ -34,6 +34,7 @@ { NSMutableArray *userRights; NSString *uid; + NSString *defaultUserID; } - (NSString *) userDisplayName; diff --git a/UI/Common/UIxUserRightsEditor.m b/UI/Common/UIxUserRightsEditor.m index 8ec44dd46..10b1be909 100644 --- a/UI/Common/UIxUserRightsEditor.m +++ b/UI/Common/UIxUserRightsEditor.m @@ -25,6 +25,7 @@ #import #import #import +#import #import "UIxUserRightsEditor.h" @@ -36,6 +37,7 @@ { uid = nil; userRights = [NSMutableArray new]; + defaultUserID = nil; } return self; @@ -55,7 +57,10 @@ - (BOOL) userIsDefaultUser { - return [uid isEqualToString: SOGoDefaultUserID]; + if (!defaultUserID) + ASSIGN (defaultUserID, [[self clientObject] defaultUserID]); + + return [uid isEqualToString: defaultUserID]; } - (NSString *) userDisplayName @@ -82,8 +87,11 @@ newUID = [[context request] formValueForKey: @"uid"]; if ([newUID length] > 0) { + if (!defaultUserID) + ASSIGN (defaultUserID, [[self clientObject] defaultUserID]); + um = [LDAPUserManager sharedUserManager]; - if ([newUID isEqualToString: SOGoDefaultUserID] + if ([newUID isEqualToString: defaultUserID] || [[um getEmailForUID: newUID] length] > 0) { ASSIGN (uid, newUID);