Monotone-Parent: 2a058e00d9a205e44c2b7f7536cfbe616d115e72

Monotone-Revision: 4db4e94b1f353dbdc30ed2247f4848acd4afdb7e

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2007-05-19T00:39:52
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau
2007-05-19 00:39:52 +00:00
parent 03e0e4b5d4
commit df31834c37
3 changed files with 25 additions and 12 deletions
+7
View File
@@ -1,5 +1,12 @@
2007-05-18 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* 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.
+2 -1
View File
@@ -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 */
+16 -11
View File
@@ -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 {