(feat) one-click option to give all permissions for user (fixes #1637)
parent
5ee5ccd078
commit
75dfebe9ae
1
NEWS
1
NEWS
|
@ -29,6 +29,7 @@ Bug fixes
|
||||||
- [web] if cn isn't found for shared mailboxes, use email address (#3733)
|
- [web] if cn isn't found for shared mailboxes, use email address (#3733)
|
||||||
- [web] fixed handling of attendees when updating an event
|
- [web] fixed handling of attendees when updating an event
|
||||||
- [web] show tooltips over long calendar/ab names (#232)
|
- [web] show tooltips over long calendar/ab names (#232)
|
||||||
|
- [web] one-click option to give all permissions for user (#1637)
|
||||||
|
|
||||||
3.1.2 (2016-06-06)
|
3.1.2 (2016-06-06)
|
||||||
------------------
|
------------------
|
||||||
|
|
|
@ -64,6 +64,11 @@
|
||||||
<div class="sg-md-subhead"><div>{{user.cn}}</div></div>
|
<div class="sg-md-subhead"><div>{{user.cn}}</div></div>
|
||||||
<div class="sg-md-body"><div>{{user.c_email}}</div></div>
|
<div class="sg-md-body"><div>{{user.c_email}}</div></div>
|
||||||
</div>
|
</div>
|
||||||
|
<md-button class="md-icon-button md-secondary" type="button"
|
||||||
|
ng-click="acl.selectAllRights(user)"
|
||||||
|
ng-hide="user.uid != acl.selectedUid || user.$isSpecial()">
|
||||||
|
<md-icon>select_all</md-icon>
|
||||||
|
</md-button>
|
||||||
<md-button class="md-icon-button md-secondary" type="button"
|
<md-button class="md-icon-button md-secondary" type="button"
|
||||||
ng-click="acl.removeUser(user)"
|
ng-click="acl.removeUser(user)"
|
||||||
ng-hide="user.uid != acl.selectedUid || user.$isSpecial()">
|
ng-hide="user.uid != acl.selectedUid || user.$isSpecial()">
|
||||||
|
|
|
@ -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
|
* @function $resetUsersRights
|
||||||
* @memberof Acl.prototype
|
* @memberof Acl.prototype
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
vm.saveModal = saveModal;
|
vm.saveModal = saveModal;
|
||||||
vm.confirmChange = confirmChange;
|
vm.confirmChange = confirmChange;
|
||||||
vm.removeUser = removeUser;
|
vm.removeUser = removeUser;
|
||||||
|
vm.selectAllRights = selectAllRights;
|
||||||
vm.addUser = addUser;
|
vm.addUser = addUser;
|
||||||
vm.selectUser = selectUser;
|
vm.selectUser = selectUser;
|
||||||
vm.confirmation = { showing: false,
|
vm.confirmation = { showing: false,
|
||||||
|
@ -55,6 +56,10 @@
|
||||||
folder.$acl.$removeUser(user.uid);
|
folder.$acl.$removeUser(user.uid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function selectAllRights(user) {
|
||||||
|
folder.$acl.$selectAllRights(user);
|
||||||
|
}
|
||||||
|
|
||||||
function addUser(data) {
|
function addUser(data) {
|
||||||
if (data) {
|
if (data) {
|
||||||
folder.$acl.$addUser(data).then(function(user) {
|
folder.$acl.$addUser(data).then(function(user) {
|
||||||
|
|
Loading…
Reference in New Issue