mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-04-18 11:38:53 +00:00
Monotone-Parent: 65e073a1a7c3638a4e473b21d5bb1d6818959ed1
Monotone-Revision: 62b78b812fed483061667782c81d44c853e623f9 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2007-05-19T00:43:40 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -29,7 +29,7 @@
|
||||
{
|
||||
BOOL prepared;
|
||||
BOOL publishInFreeBusy;
|
||||
NSArray *acls;
|
||||
NSArray *aclUsers;
|
||||
NSArray *savedUIDs;
|
||||
NSMutableArray *users;
|
||||
NSString *currentUser;
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
#import <SoObjects/SOGo/LDAPUserManager.h>
|
||||
#import <SoObjects/SOGo/SOGoContentObject.h>
|
||||
#import <SoObjects/SOGo/SOGoPermissions.h>
|
||||
#import <SoObjects/SOGo/NSArray+Utilities.h>
|
||||
|
||||
#import "UIxAclEditor.h"
|
||||
|
||||
@@ -38,7 +39,7 @@
|
||||
{
|
||||
if ((self = [super init]))
|
||||
{
|
||||
acls = nil;
|
||||
aclUsers = nil;
|
||||
prepared = NO;
|
||||
publishInFreeBusy = NO;
|
||||
users = [NSMutableArray new];
|
||||
@@ -59,10 +60,10 @@
|
||||
|
||||
- (NSArray *) aclsForObject
|
||||
{
|
||||
if (!acls)
|
||||
acls = [[self clientObject] acls];
|
||||
if (!aclUsers)
|
||||
aclUsers = [[self clientObject] aclUsers];
|
||||
|
||||
return acls;
|
||||
return aclUsers;
|
||||
}
|
||||
|
||||
- (NSString *) _displayNameForUID: (NSString *) uid
|
||||
@@ -92,24 +93,20 @@
|
||||
- (void) _prepareUsers
|
||||
{
|
||||
NSEnumerator *aclsEnum;
|
||||
NSDictionary *currentAcl;
|
||||
NSString *currentUID, *ownerLogin;
|
||||
|
||||
ownerLogin = [[self clientObject] ownerInContext: context];
|
||||
|
||||
aclsEnum = [[self aclsForObject] objectEnumerator];
|
||||
currentAcl = [aclsEnum nextObject];
|
||||
while (currentAcl)
|
||||
currentUID = [aclsEnum nextObject];
|
||||
while (currentUID)
|
||||
{
|
||||
currentUID = [currentAcl objectForKey: @"c_uid"];
|
||||
if (!([currentUID isEqualToString: ownerLogin]
|
||||
|| [currentUID isEqualToString: SOGoDefaultUserID]
|
||||
|| [users containsObject: currentUID]))
|
||||
[users addObject: currentUID];
|
||||
currentAcl = [aclsEnum nextObject];
|
||||
|
||||
prepared = YES;
|
||||
|| [currentUID isEqualToString: SOGoDefaultUserID]))
|
||||
[users addObjectUniquely: currentUID];
|
||||
currentUID = [aclsEnum nextObject];
|
||||
}
|
||||
prepared = YES;
|
||||
}
|
||||
|
||||
- (NSArray *) usersForObject
|
||||
|
||||
@@ -119,7 +119,9 @@ function onOpenUserRights(event) {
|
||||
|
||||
function onAclLoadHandler() {
|
||||
defaultUserID = $("defaultUserID").value;
|
||||
Event.observe($("defaultRolesBtn"), "click", openRightsForDefaultUser);
|
||||
var defaultRolesBtn = $("defaultRolesBtn");
|
||||
if (defaultRolesBtn)
|
||||
Event.observe(defaultRolesBtn, "click", openRightsForDefaultUser);
|
||||
var ul = $("userList");
|
||||
var lis = ul.childNodesWithTag("li");
|
||||
for (var i = 0; i < lis.length; i++)
|
||||
|
||||
Reference in New Issue
Block a user