mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-10-17 09:18:13 +00:00
Monotone-Parent: 07066101c28f825ad99e746c40e1e3eb5c46ffd5
Monotone-Revision: 77b22cd191630300928aceb64e81d96f4a520b28 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2007-12-06T23:09:58 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
1 parent
790e92d2ea
commit
bf0a3b5f81
6 files changed
+18
-14
No files matched your search
@@ -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>
|
||||
@@ -186,20 +187,15 @@
|
||||
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
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
<input id="defaultRolesBtn" type="button"
|
||||
class="button" label:value="Default Roles"/>
|
||||
<div class="userSelector" id="userRoles">
|
||||
<var:if condition="currentUserIsOwner">
|
||||
<var:if condition="canModifyAcls">
|
||||
<span id="userSelectorButtons">
|
||||
<a href="#"
|
||||
class="button"><img rsrc:src="add-contact.gif"
|
||||
|
||||
Reference in new issue
Block a user