parent
8395a78f6d
commit
717bab718c
1
NEWS
1
NEWS
|
@ -3,6 +3,7 @@
|
||||||
|
|
||||||
Bug fixes
|
Bug fixes
|
||||||
- [web] fixed error handling when renaming a mailbox
|
- [web] fixed error handling when renaming a mailbox
|
||||||
|
- [web] fixed user removal from ACLs in Administration module (#3713)
|
||||||
|
|
||||||
3.1.1 (2016-06-02)
|
3.1.1 (2016-06-02)
|
||||||
------------------
|
------------------
|
||||||
|
|
|
@ -54,7 +54,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
function removeUser(user) {
|
function removeUser(user) {
|
||||||
stateFolder.$acl.$removeUser(user.uid).catch(function(data, status) {
|
stateFolder.$acl.$removeUser(user.uid, stateFolder.owner).catch(function(data, status) {
|
||||||
Dialog.alert(l('Warning'), l('An error occured please try again.'));
|
Dialog.alert(l('Warning'), l('An error occured please try again.'));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -112,10 +112,17 @@
|
||||||
* @desc Remove a user from the folder's ACL
|
* @desc Remove a user from the folder's ACL
|
||||||
* @return a promise of the server call to remove the user from the folder's ACL
|
* @return a promise of the server call to remove the user from the folder's ACL
|
||||||
*/
|
*/
|
||||||
Acl.prototype.$removeUser = function(uid) {
|
Acl.prototype.$removeUser = function(uid, owner) {
|
||||||
var _this = this,
|
var _this = this,
|
||||||
param = {uid: uid};
|
param = {uid: uid},
|
||||||
return Acl.$$resource.fetch(this.folderId, 'removeUserFromAcls', param).then(function() {
|
acls;
|
||||||
|
|
||||||
|
if (angular.isDefined(owner))
|
||||||
|
acls = Acl.$$resource.userResource(owner).fetch(this.folderId, 'removeUserFromAcls', param);
|
||||||
|
else
|
||||||
|
acls = Acl.$$resource.fetch(this.folderId, 'removeUserFromAcls', param);
|
||||||
|
|
||||||
|
return acls.then(function() {
|
||||||
var i = _.indexOf(_.map(_this.users, 'uid'), uid);
|
var i = _.indexOf(_.map(_this.users, 'uid'), uid);
|
||||||
if (i >= 0) {
|
if (i >= 0) {
|
||||||
_this.users.splice(i, 1);
|
_this.users.splice(i, 1);
|
||||||
|
|
Loading…
Reference in New Issue