diff --git a/ChangeLog b/ChangeLog index f48afafb5..5f811c70f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2007-02-16 Wolfgang Sourdeau + * SoObjects/SOGo/SOGoUser.m ([SOGoUser + -rolesForObject:objectinContext:context]): test for + "rolesOfUser:inContext:" in addition to "roleOfUser:...". + * SoObjects/Appointments/SOGoCalendarComponent.m ([SOGoCalendarComponent -rolesOfUser:logininContext:context]): returns the roles of the user on the container object if the event diff --git a/SoObjects/SOGo/SOGoUser.m b/SoObjects/SOGo/SOGoUser.m index 4292e7b91..0c7a3947f 100644 --- a/SoObjects/SOGo/SOGoUser.m +++ b/SoObjects/SOGo/SOGoUser.m @@ -30,6 +30,8 @@ - (NSString *) roleOfUser: (NSString *) uid inContext: (WOContext *) context; +- (NSArray *) rolesOfUser: (NSString *) uid + inContext: (WOContext *) context; @end @@ -159,7 +161,14 @@ aclsFolder = [SOGoAclsFolder aclsFolder]; sogoRoles = [aclsFolder aclsForObject: (SOGoObject *) object forUser: login]; - [rolesForObject addObjectsFromArray: sogoRoles]; + if (sogoRoles) + [rolesForObject addObjectsFromArray: sogoRoles]; + } + if ([object respondsToSelector: @selector (rolesOfUser:inContext:)]) + { + sogoRoles = [object rolesOfUser: login inContext: context]; + if (sogoRoles) + [rolesForObject addObjectsFromArray: sogoRoles]; } if ([object respondsToSelector: @selector (roleOfUser:inContext:)]) {