diff --git a/ChangeLog b/ChangeLog index c532738db..e22af6320 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2007-01-03 Wolfgang Sourdeau + + * UI/Common/UIxAclEditor.m ([UIxAclEditor -assistantsValue]): new + accessor that returns the comma-separated list of users with role + "Assistant". + ([UIxAclEditor -delegatesValue]): same as above for "Delegate". + ([UIxAclEditor -_prepareUsers]): there is no longer a concept of + "checkedUsers". Instead, each user is either classified in the + list of assistants or the list of delegates. + 2006-12-22 Wolfgang Sourdeau * UI/MailerUI/UIxMailMainFrame.m ([UIxMailMainFrame diff --git a/UI/Common/UIxAclEditor.h b/UI/Common/UIxAclEditor.h index 53f7d2990..e1dbaa501 100644 --- a/UI/Common/UIxAclEditor.h +++ b/UI/Common/UIxAclEditor.h @@ -31,12 +31,15 @@ BOOL publishInFreeBusy; NSArray *acls; NSMutableArray *users; - NSMutableArray *checkedUsers; + NSMutableArray *assistants; + NSMutableArray *delegates; NSString *ownerCN; } - (NSArray *) aclsForFolder; - (NSString *) ownerCN; +- (NSString *) assistantsValue; +- (NSString *) delegatesValue; @end diff --git a/UI/Common/UIxAclEditor.m b/UI/Common/UIxAclEditor.m index cb8cdb0bd..7b00e62d0 100644 --- a/UI/Common/UIxAclEditor.m +++ b/UI/Common/UIxAclEditor.m @@ -41,7 +41,8 @@ prepared = NO; publishInFreeBusy = NO; users = [NSMutableArray new]; - checkedUsers = [NSMutableArray new]; + delegates = [NSMutableArray new]; + assistants = [NSMutableArray new]; ownerCN = nil; } @@ -51,7 +52,8 @@ - (void) dealloc { [users release]; - [checkedUsers release]; + [delegates release]; + [assistants release]; if (ownerCN) [ownerCN release]; [super dealloc]; @@ -104,7 +106,9 @@ { if ([[currentAcl objectForKey: @"c_role"] isEqualToString: SOGoRole_Delegate]) - [checkedUsers addObject: currentUser]; + [delegates addObject: [currentUser cn]]; + else + [assistants addObject: [currentUser cn]]; [users addObject: currentUser]; } } @@ -122,12 +126,28 @@ return users; } -- (NSArray *) checkedUsers +- (NSArray *) delegates { if (!prepared) [self _prepareUsers]; - return checkedUsers; + return delegates; +} + +- (NSString *) assistantsValue +{ + if (!prepared) + [self _prepareUsers]; + + return [assistants componentsJoinedByString: @","]; +} + +- (NSString *) delegatesValue +{ + if (!prepared) + [self _prepareUsers]; + + return [delegates componentsJoinedByString: @","]; } - (BOOL) publishInFreeBusy