]> err.no Git - scalable-opengroupware.org/blobdiff - UI/Common/UIxAclEditor.m
git-svn-id: http://svn.opengroupware.org/SOGo/inverse/trunk@1293 d1b88da0-ebda-0310...
[scalable-opengroupware.org] / UI / Common / UIxAclEditor.m
index 7d7936c4a998f01512066eda247ff6fcf4085202..1d0a430e46ddc1c7b7add313cbc3579721d73764 100644 (file)
@@ -25,6 +25,7 @@
 #import <Foundation/NSKeyValueCoding.h>
 #import <NGObjWeb/SoUser.h>
 #import <NGObjWeb/WORequest.h>
+#import <NGObjWeb/SoSecurityManager.h>
 #import <NGCards/iCalPerson.h>
 #import <SoObjects/SOGo/LDAPUserManager.h>
 #import <SoObjects/SOGo/SOGoContentObject.h>
   return [self jsCloseWithRefreshMethod: nil];
 }
 
-- (BOOL) currentUserIsOwner
+- (BOOL) canModifyAcls
 {
-  SOGoObject *clientObject;
-  SOGoUser *user;
-  NSString *currentUserLogin, *ownerLogin;
-  
-  clientObject = [self clientObject];
-  ownerLogin = [clientObject ownerInContext: context];
-  user = [context activeUser];
-  currentUserLogin = [user login];
-  
-  return ([ownerLogin isEqualToString: currentUserLogin]
-         || ([user respondsToSelector: @selector (isSuperUser)]
-             && [user isSuperUser]));
+  SoSecurityManager *mgr;
+
+  mgr = [SoSecurityManager sharedSecurityManager];
+
+  return (![mgr validatePermission: SOGoPerm_SaveAcls
+               onObject: [self clientObject]
+               inContext: context]);
 }
 
 // - (id <WOActionResults>) addUserInAcls