From 11bee71579f434b569b5a662782bad9a28202566 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Wed, 21 Feb 2007 21:12:41 +0000 Subject: [PATCH] Monotone-Parent: 29bd9d1c5051eac140806ad6a68c2587e599f1c8 Monotone-Revision: ff895fda6a6ad0202ba5094f8f2c79c3278396f2 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2007-02-21T21:12:41 Monotone-Branch: ca.inverse.sogo --- SoObjects/SOGo/SOGoContentObject.m | 32 ++++++++++++++++++++++++++---- 1 file changed, 28 insertions(+), 4 deletions(-) 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 {