mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-08-20 06:03:20 +00:00
Fix ACLs management of folders in Administration
The active (super) user was not able to add herself to the ACLs of a different user because we were removing the active user from the users search instead of removing the folder's owner.
This commit is contained in:
@@ -535,14 +535,14 @@
|
||||
{
|
||||
NSString *uid;
|
||||
NSDictionary *contact;
|
||||
NSString *contactInfo, *login;
|
||||
NSString *contactInfo, *owner;
|
||||
NSMutableArray *jsonResponse;
|
||||
NSMutableDictionary *jsonLine;
|
||||
NSArray *allUsers;
|
||||
int count, max;
|
||||
BOOL activeUserIsInDomain;
|
||||
|
||||
login = [[context activeUser] login];
|
||||
owner = [[self clientObject] ownerInContext: context];
|
||||
activeUserIsInDomain = ([domain length] == 0 || [[[context activeUser] domain] isEqualToString: domain]);
|
||||
|
||||
// We sort our array - this is pretty useful for the Web
|
||||
@@ -556,8 +556,8 @@
|
||||
contact = [allUsers objectAtIndex: count];
|
||||
uid = [contact objectForKey: @"c_uid"];
|
||||
|
||||
// We do NOT return the current authenticated user
|
||||
if (!activeUserIsInDomain || ![uid isEqualToString: login])
|
||||
// We do NOT return the owner from which the search is performed
|
||||
if (!activeUserIsInDomain || ![uid isEqualToString: owner])
|
||||
{
|
||||
jsonLine = [NSMutableDictionary dictionary];
|
||||
if ([domain length])
|
||||
|
||||
Reference in New Issue
Block a user