Monotone-Parent: ddc6033ba0aed2dee64092066218f39bf7e6a6c9

Monotone-Revision: 2e6ec6866313aade92a1bcb4405a7ef0ff26696c

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2009-06-04T00:40:21
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau
2009-06-04 00:40:21 +00:00
parent d976a8cbb0
commit 4e98c44d6f
6 changed files with 98 additions and 21 deletions
+21
View File
@@ -185,6 +185,7 @@ static NSArray *childRecordFields = nil;
ocsFolder = nil;
aclCache = [NSMutableDictionary new];
childRecords = [NSMutableDictionary new];
userCanAccessAllObjects = NO;
}
return self;
@@ -756,6 +757,26 @@ static NSArray *childRecordFields = nil;
inContext: queryContext];
}
/* handling acls from quick tables */
- (void) initializeQuickTablesAclsInContext: (WOContext *) localContext
{
NSString *login;
if (activeUserIsOwner)
userCanAccessAllObjects = activeUserIsOwner;
else
{
login = [[localContext activeUser] login];
/* we only grant "userCanAccessAllObjects" for role "ObjectEraser" and
not "ObjectCreator" because the latter doesn't imply we can read
properties from subobjects or even know their existence. */
userCanAccessAllObjects = ([[self ownerInContext: localContext]
isEqualToString: login]
|| [[self aclsForUser: login]
containsObject: SOGoRole_ObjectEraser]);
}
}
/* acls as a container */
- (NSArray *) aclUsersForObjectAtPath: (NSArray *) objectPathArray;