mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-10-05 12:00:33 +00:00
(js) Improve ACLs handling of inactive users
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
vm.selectedUid = null;
|
||||
vm.selectUser = selectUser;
|
||||
vm.selectAllRights = selectAllRights;
|
||||
vm.showRights = showRights;
|
||||
vm.removeUser = removeUser;
|
||||
vm.getTemplate = getTemplate;
|
||||
vm.close = close;
|
||||
@@ -56,6 +57,10 @@
|
||||
}
|
||||
}
|
||||
|
||||
function showRights(user) {
|
||||
return vm.selectedUid == user.uid && user.rights;
|
||||
}
|
||||
|
||||
function userFilter($query) {
|
||||
return User.$filter($query, stateFolder.$acl.users, { dry: true, uid: vm.user.uid });
|
||||
}
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
vm.addUser = addUser;
|
||||
vm.selectAllRights = selectAllRights;
|
||||
vm.selectUser = selectUser;
|
||||
vm.showRights = showRights;
|
||||
vm.confirmation = { showing: false,
|
||||
message: ''};
|
||||
|
||||
@@ -86,6 +87,10 @@
|
||||
vm.selectedUser.$rights();
|
||||
}
|
||||
}
|
||||
|
||||
function showRights(user) {
|
||||
return vm.selectedUid == user.uid && user.rights;
|
||||
}
|
||||
}
|
||||
|
||||
angular
|
||||
|
||||
@@ -125,13 +125,22 @@
|
||||
this.empty = ' ';
|
||||
};
|
||||
|
||||
/**
|
||||
* @function $fullname
|
||||
* @memberof User.prototype
|
||||
* @return a string representing the fullname
|
||||
*/
|
||||
User.prototype.$fullname = function() {
|
||||
return this.cn || this.uid;
|
||||
};
|
||||
|
||||
/**
|
||||
* @function $shortFormat
|
||||
* @memberof User.prototype
|
||||
* @return the fullname along with the email address
|
||||
*/
|
||||
User.prototype.$shortFormat = function(options) {
|
||||
var fullname = this.cn || this.c_email;
|
||||
var fullname = this.$fullname();
|
||||
var email = this.c_email;
|
||||
var no_email = options && options.email === false;
|
||||
if (!no_email && email && fullname != email) {
|
||||
|
||||
Reference in New Issue
Block a user