mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-06-13 06:09:43 +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:
@@ -57,7 +57,7 @@
|
||||
}
|
||||
|
||||
function userFilter($query) {
|
||||
return User.$filter($query, stateFolder.$acl.users, { dry: true });
|
||||
return User.$filter($query, stateFolder.$acl.users, { dry: true, uid: vm.user.uid });
|
||||
}
|
||||
|
||||
function removeUser(user) {
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
* @return a promise of an array of matching User objects
|
||||
*/
|
||||
User.$filter = function(search, excludedUsers, options) {
|
||||
var _this = this, param = {search: search};
|
||||
var _this = this, resource = User.$$resource, param = {search: search};
|
||||
|
||||
if (!options || !options.dry) {
|
||||
if (!search) {
|
||||
@@ -57,8 +57,11 @@
|
||||
}
|
||||
User.$query = search;
|
||||
}
|
||||
else if (options && options.uid) {
|
||||
resource = User.$$resource.userResource(options.uid);
|
||||
}
|
||||
|
||||
return User.$$resource.fetch(null, 'usersSearch', param).then(function(response) {
|
||||
return resource.fetch(null, 'usersSearch', param).then(function(response) {
|
||||
var results, index, user, users,
|
||||
compareUids = function(data) {
|
||||
return this.uid == data.uid;
|
||||
|
||||
Reference in New Issue
Block a user