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:
Wolfgang Sourdeau committed 2007-12-06 23:09:58 +00:00
1 parent 790e92d2ea
commit bf0a3b5f81
6 files changed
+18 -14

No files matched your search

+9 -13
View 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>
@@ -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
+1 -1
View File
@@ -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"