diff --git a/ChangeLog b/ChangeLog index 8c2acf9dd..e82be45c3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2007-05-18 Wolfgang Sourdeau + * SoObjects/SOGo/SOGoFolder.m ([SOGoFolder + -aclUsersForObjectAtPath:objectPathArray]): new method that being + forwarded the calles to aclUsers for the GCS-based subclasses of + SOGoObject. + * SoObjects/Mailer/SOGoMailFolder.m: removed all the previous methods that would have been used to support IMAP acls. Replaced them with the new protocol for them that has been implemented in diff --git a/SoObjects/SOGo/SOGoFolder.h b/SoObjects/SOGo/SOGoFolder.h index b5527d498..a6aaf18d6 100644 --- a/SoObjects/SOGo/SOGoFolder.h +++ b/SoObjects/SOGo/SOGoFolder.h @@ -72,7 +72,7 @@ - (NSException *) delete; /* acls as a container */ -- (NSArray *) aclsForObjectAtPath: (NSArray *) objectPathArray; +- (NSArray *) aclUsersForObjectAtPath: (NSArray *) objectPathArray; - (NSArray *) aclsForUser: (NSString *) uid forObjectAtPath: (NSArray *) objectPathArray; - (void) setRoles: (NSArray *) roles diff --git a/SoObjects/SOGo/SOGoFolder.m b/SoObjects/SOGo/SOGoFolder.m index a55c3dad2..2fe7f49e7 100644 --- a/SoObjects/SOGo/SOGoFolder.m +++ b/SoObjects/SOGo/SOGoFolder.m @@ -266,16 +266,18 @@ /* acls as a container */ -- (NSArray *) aclsForObjectAtPath: (NSArray *) objectPathArray; +- (NSArray *) aclUsersForObjectAtPath: (NSArray *) objectPathArray; { EOQualifier *qualifier; NSString *qs; + NSArray *records; qs = [NSString stringWithFormat: @"c_object = '/%@'", [objectPathArray componentsJoinedByString: @"/"]]; qualifier = [EOQualifier qualifierWithQualifierFormat: qs]; + records = [[self ocsFolder] fetchAclMatchingQualifier: qualifier]; - return [[self ocsFolder] fetchAclMatchingQualifier: qualifier]; + return [records valueForKey: @"c_uid"]; } - (NSArray *) _fetchAclsForUser: (NSString *) uid @@ -424,9 +426,9 @@ return nil; } -- (NSArray *) acls +- (NSArray *) aclUsers { - return [self aclsForObjectAtPath: [self pathArrayToSoObject]]; + return [self aclUsersForObjectAtPath: [self pathArrayToSoObject]]; } - (NSArray *) aclsForUser: (NSString *) uid @@ -449,6 +451,11 @@ forObjectAtPath: [self pathArrayToSoObject]]; } +- (BOOL) hasSupportForDefaultRoles +{ + return YES; +} + /* WebDAV */ - (BOOL) davIsCollection