(js) Fix caching of user rights

This commit is contained in:
Francis Lachapelle 2016-09-23 16:43:48 -04:00
parent d81a663fd1
commit 93de7b9ab3
2 changed files with 2 additions and 1 deletions

View file

@ -125,6 +125,7 @@
return acls.then(function() { 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[i].$shadowRights = null;
_this.users.splice(i, 1); _this.users.splice(i, 1);
} }
}); });

View file

@ -256,7 +256,7 @@
_this.rights[key] = 0; _this.rights[key] = 0;
}); });
} }
else { else if (this.$shadowRights) {
// Restore initial rights // Restore initial rights
this.rights = angular.copy(this.$shadowRights); this.rights = angular.copy(this.$shadowRights);
} }