diff --git a/ChangeLog b/ChangeLog index d6499d9c9..5943bf0b0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2007-05-18 Wolfgang Sourdeau + * SoObjects/SOGo/SOGoObject.m ([SOGoObject -aclUsers]): renamed + "acl" to "aclUsers". Now designed to return only the uid of the + users involved in an ACL. + ([SOGoObject -hasSupportForDefaultRoles]): new method returning + "NO" by default. To indicate to the acl editor that we don't want + to handle a default user. + * SoObjects/SOGo/SOGoPermissions.[hm]: added the SOGoRole_ObjectReader, SOGoRole_Folder*, and SOGoMailRole_* symbols. diff --git a/SoObjects/SOGo/SOGoObject.h b/SoObjects/SOGo/SOGoObject.h index e5a77e739..0b2360a6a 100644 --- a/SoObjects/SOGo/SOGoObject.h +++ b/SoObjects/SOGo/SOGoObject.h @@ -101,11 +101,12 @@ extern NSString *SOGoDefaultUserID; /* acls */ - (NSArray *) defaultAclRoles; -- (NSArray *) acls; +- (NSArray *) aclUsers; - (NSArray *) aclsForUser: (NSString *) uid; - (void) setRoles: (NSArray *) roles forUser: (NSString *) uid; - (void) removeAclsForUsers: (NSArray *) users; +- (BOOL) hasSupportForDefaultRoles; /* description */ diff --git a/SoObjects/SOGo/SOGoObject.m b/SoObjects/SOGo/SOGoObject.m index 57b13cd78..6fa6c5328 100644 --- a/SoObjects/SOGo/SOGoObject.m +++ b/SoObjects/SOGo/SOGoObject.m @@ -354,23 +354,23 @@ static BOOL kontactGroupDAV = YES; - (SOGoDAVSet *) davAcl { - NSArray *role; - NSEnumerator *acls; + NSArray *roles; + NSEnumerator *uids; NSMutableDictionary *aclsDictionary; - NSDictionary *currentAcl; + NSString *currentUID; SoClassSecurityInfo *sInfo; - acls = [[self acls] objectEnumerator]; aclsDictionary = [NSMutableDictionary dictionary]; + uids = [[self aclUsers] objectEnumerator]; sInfo = [[self class] soClassSecurityInfo]; - currentAcl = [acls nextObject]; - while (currentAcl) + currentUID = [uids nextObject]; + while (currentUID) { - role = [NSArray arrayWithObject: [currentAcl objectForKey: @"role"]]; - [aclsDictionary setObject: [sInfo DAVPermissionsForRoles: role] - forKey: [currentAcl objectForKey: @"uid"]]; - currentAcl = [acls nextObject]; + roles = [self aclsForUser: currentUID]; + [aclsDictionary setObject: [sInfo DAVPermissionsForRoles: roles] + forKey: currentUID]; + currentUID = [uids nextObject]; } [self _appendRolesForPseudoPrincipals: aclsDictionary withClassSecurityInfo: sInfo]; @@ -707,7 +707,7 @@ static BOOL kontactGroupDAV = YES; /* acls */ -- (NSArray *) acls +- (NSArray *) aclUsers { [self subclassResponsibility: _cmd]; @@ -739,6 +739,11 @@ static BOOL kontactGroupDAV = YES; [self subclassResponsibility: _cmd]; } +- (BOOL) hasSupportForDefaultRoles +{ + return NO; +} + /* description */ - (void)appendAttributesToDescription:(NSMutableString *)_ms {