mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-10-06 20:37:14 +00:00
Monotone-Parent: 7342d9cd31675160736e0f2db8a83047d9babea9
Monotone-Revision: 4ebf80607b2a71f3b2192bd3ba8c310f15bd37f5 Monotone-Author: flachapelle@inverse.ca Monotone-Date: 2007-10-09T17:57:27 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
1 parent
03382298b8
commit
dc48bb9e4c
5 files changed
+190
-5
No files matched your search
@@ -31,6 +31,7 @@
|
||||
#import <NGObjWeb/WORequest.h>
|
||||
#import <NGObjWeb/WOResponse.h>
|
||||
#import <NGObjWeb/SoSecurityManager.h>
|
||||
#import <NGObjWeb/SoClassSecurityInfo.h>
|
||||
|
||||
#import <SoObjects/SOGo/LDAPUserManager.h>
|
||||
#import <SoObjects/SOGo/NSArray+Utilities.h>
|
||||
@@ -146,7 +147,34 @@
|
||||
|
||||
- (WOResponse *) canAccessContentAction
|
||||
{
|
||||
return [self responseWith204];
|
||||
#warning IMPROVEMENTS REQUIRED!
|
||||
NSArray *acls;
|
||||
// NSEnumerator *userAcls;
|
||||
// NSString *currentAcl;
|
||||
|
||||
[self _setupContext];
|
||||
|
||||
// NSLog(@"canAccessContentAction %@, owner %@", subscriptionPointer, owner);
|
||||
|
||||
if ([login isEqualToString: owner] || [owner isEqualToString: @"nobody"]) {
|
||||
return [self responseWith204];
|
||||
}
|
||||
else {
|
||||
acls = [clientObject aclsForUser: login];
|
||||
// userAcls = [acls objectEnumerator];
|
||||
// currentAcl = [userAcls nextObject];
|
||||
// while (currentAcl) {
|
||||
// NSLog(@"ACL login %@, owner %@, folder %@: %@",
|
||||
// login, owner, baseFolder, currentAcl);
|
||||
// currentAcl = [userAcls nextObject];
|
||||
// }
|
||||
if (([[clientObject folderType] isEqualToString: @"Contact"] && [acls containsObject: SOGoRole_ObjectReader]) ||
|
||||
([[clientObject folderType] isEqualToString: @"Appointment"] && [acls containsObject: SOGoRole_AuthorizedSubscriber])) {
|
||||
return [self responseWith204];
|
||||
}
|
||||
}
|
||||
|
||||
return [self responseWithStatus: 403];
|
||||
}
|
||||
|
||||
- (WOResponse *) _realFolderActivation: (BOOL) makeActive
|
||||
|
||||
Reference in new issue
Block a user