mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-05-25 13:25:28 +00:00
(feat) one-click option to give all permissions for user (fixes #1637)
This commit is contained in:
@@ -130,6 +130,17 @@
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* @function $selectAllRights
|
||||
* @memberof Acl.prototype
|
||||
* @desc Select all rights of an user
|
||||
*/
|
||||
Acl.prototype.$selectAllRights = function(user) {
|
||||
_.forEach(user.rights, function(value, right) {
|
||||
user.rights[right] = 1;
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* @function $resetUsersRights
|
||||
* @memberof Acl.prototype
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
vm.saveModal = saveModal;
|
||||
vm.confirmChange = confirmChange;
|
||||
vm.removeUser = removeUser;
|
||||
vm.selectAllRights = selectAllRights;
|
||||
vm.addUser = addUser;
|
||||
vm.selectUser = selectUser;
|
||||
vm.confirmation = { showing: false,
|
||||
@@ -55,6 +56,10 @@
|
||||
folder.$acl.$removeUser(user.uid);
|
||||
}
|
||||
|
||||
function selectAllRights(user) {
|
||||
folder.$acl.$selectAllRights(user);
|
||||
}
|
||||
|
||||
function addUser(data) {
|
||||
if (data) {
|
||||
folder.$acl.$addUser(data).then(function(user) {
|
||||
|
||||
Reference in New Issue
Block a user