diff --git a/ChangeLog b/ChangeLog index 45fc4bcf2..14d5a8947 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2007-04-17 Wolfgang Sourdeau + * SoObjects/SOGo/SOGoObject.m ([SOGoObject -acls]): stub method + that requires overriding by subclasses. + ([SOGoObject -aclsForUser:uid]): idem. + ([SOGoObject -defaultAclRoles]): idem. + ([SOGoObject -setRoles:rolesforUser:uid]): idem. + ([SOGoObject -removeAclsForUsers:users]): idem. + * UI/Common/UIxObjectActions.m: new module implementing the web actions common to SOGoObject and all its subclasses. ([UIxObjectActions -addUserInAclsAction]): new method that adds a diff --git a/SoObjects/SOGo/SOGoObject.h b/SoObjects/SOGo/SOGoObject.h index b09b636cc..00d257bde 100644 --- a/SoObjects/SOGo/SOGoObject.h +++ b/SoObjects/SOGo/SOGoObject.h @@ -86,9 +86,18 @@ - (NSException *)matchesRequestConditionInContext:(id)_ctx; +/* acls */ + +- (NSString *) defaultAclRoles; +- (NSArray *) acls; +- (NSArray *) aclsForUser: (NSString *) uid; +- (void) setRoles: (NSString *) roles + forUser: (NSString *) uid; +- (void) removeAclsForUsers: (NSArray *) users; + /* description */ -- (void)appendAttributesToDescription:(NSMutableString *)_ms; +- (void) appendAttributesToDescription:(NSMutableString *)_ms; @end diff --git a/SoObjects/SOGo/SOGoObject.m b/SoObjects/SOGo/SOGoObject.m index a0be82859..2688f7659 100644 --- a/SoObjects/SOGo/SOGoObject.m +++ b/SoObjects/SOGo/SOGoObject.m @@ -26,6 +26,7 @@ #import #import #import +#import #import "common.h" @@ -34,7 +35,6 @@ #import "SOGoPermissions.h" #import "SOGoUser.h" -#import "SOGoAclsFolder.h" #import "SOGoAuthenticator.h" #import "SOGoUserFolder.h" @@ -354,7 +354,7 @@ static BOOL kontactGroupDAV = YES; NSDictionary *currentAcl; SoClassSecurityInfo *sInfo; - acls = [[[SOGoAclsFolder aclsFolder] aclsForObject: self] objectEnumerator]; + acls = [[self acls] objectEnumerator]; aclsDictionary = [NSMutableDictionary dictionary]; sInfo = [[self class] soClassSecurityInfo]; @@ -690,6 +690,40 @@ static BOOL kontactGroupDAV = YES; return nil; } +/* acls */ + +- (NSArray *) acls +{ + [self subclassResponsibility: _cmd]; + + return nil; +} + +- (NSArray *) aclsForUser: (NSString *) uid +{ + [self subclassResponsibility: _cmd]; + + return nil; +} + +- (NSString *) defaultAclRoles +{ + [self subclassResponsibility: _cmd]; + + return nil; +} + +- (void) setRoles: (NSString *) roles + forUser: (NSString *) uid +{ + [self subclassResponsibility: _cmd]; +} + +- (void) removeAclsForUsers: (NSArray *) users +{ + [self subclassResponsibility: _cmd]; +} + /* description */ - (void)appendAttributesToDescription:(NSMutableString *)_ms {