diff --git a/SoObjects/SOGo/SOGoContentObject.m b/SoObjects/SOGo/SOGoContentObject.m index 724f19140..3c7cc1a16 100644 --- a/SoObjects/SOGo/SOGoContentObject.m +++ b/SoObjects/SOGo/SOGoContentObject.m @@ -19,10 +19,13 @@ 02111-1307, USA. */ -#include "SOGoContentObject.h" -#include "SOGoFolder.h" -#include "common.h" -#include +#import + +#import + +#import "common.h" +#import "SOGoFolder.h" +#import "SOGoContentObject.h" @interface SOGoContentObject(ETag) - (NSArray *)parseETagList:(NSString *)_c; @@ -236,6 +239,27 @@ return [_ctx response]; } +/* security */ +- (NSArray *) rolesOfUser: (NSString *) login + inContext: (WOContext *) context +{ + NSMutableArray *sogoRoles; + SOGoUser *user; + + sogoRoles = [NSMutableArray new]; + [sogoRoles autorelease]; + + if (![container nameExistsInFolder: nameInContainer]) + { + user = [[SOGoUser alloc] initWithLogin: login roles: nil]; + [sogoRoles addObjectsFromArray: [user rolesForObject: container + inContext: context]]; + [user release]; + } + + return sogoRoles; +} + /* E-Tags */ - (id)davEntityTag {