Monotone-Parent: 46a08848069e50e55115c60ffb756cc911fa4310

Monotone-Revision: b9fe5f69982d5b9b75bf023532dd4a76d1435875

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2007-06-01T21:03:50
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau
2007-06-01 21:03:50 +00:00
parent 048cb61b53
commit cfac03935f
2 changed files with 26 additions and 2 deletions
+5
View File
@@ -1,5 +1,10 @@
2007-06-01 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* SoObjects/SOGo/SOGoFolder.m ([SOGoFolder -aclsForUser:uid]): if
the user has the "ObjectReader" role on the parent container, then
he is granted the "ObjectViewer" role on this object. Same for
"ObjectEraser", although this might change later.
* UI/Scheduler/UIxComponentEditor.m ([UIxComponentEditor
-toolbar]): determine the toolbar filename based on the
permissions declared by the securitymanager. The role mechanism
+21 -2
View File
@@ -434,8 +434,27 @@ static NSString *defaultUserID = @"<default>";
- (NSArray *) aclsForUser: (NSString *) uid
{
return [self aclsForUser: uid
forObjectAtPath: [self pathArrayToSoObject]];
NSMutableArray *acls;
NSArray *ownAcls, *containerAcls;
acls = [NSMutableArray array];
ownAcls = [self aclsForUser: uid
forObjectAtPath: [self pathArrayToSoObject]];
[acls addObjectsFromArray: ownAcls];
if ([container respondsToSelector: @selector (aclsForUser:)])
{
containerAcls = [container aclsForUser: uid];
if ([containerAcls count] > 0)
{
if ([containerAcls containsObject: SOGoRole_ObjectReader])
[acls addObject: SOGoRole_ObjectViewer];
#warning this should be checked
if ([containerAcls containsObject: SOGoRole_ObjectEraser])
[acls addObject: SOGoRole_ObjectEraser];
}
}
return acls;
}
- (void) setRoles: (NSArray *) roles