mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-05-22 03:45:25 +00:00
Move ACL editor into a separate template
The user rights remain dynamic, based on the object type (addressbook vs mailbox vs calendar).
This commit is contained in:
@@ -38,7 +38,8 @@
|
||||
$timeout: $timeout,
|
||||
$$resource: new Resource(Settings.baseURL),
|
||||
$Card: Card,
|
||||
$$Acl: Acl
|
||||
$$Acl: Acl,
|
||||
activeUser: Settings.activeUser
|
||||
});
|
||||
|
||||
return AddressBook; // return constructor
|
||||
@@ -77,6 +78,9 @@
|
||||
// Instanciate AddressBook objects
|
||||
angular.forEach(this.$addressbooks, function(o, i) {
|
||||
_this.$addressbooks[i] = new AddressBook(o);
|
||||
// Add 'isOwned' attribute based on active user (TODO: add it server-side?)
|
||||
_this.$addressbooks[i].isOwned = _this.activeUser.isSuperUser
|
||||
|| _this.$addressbooks[i].owner == _this.activeUser.login;
|
||||
});
|
||||
}
|
||||
return this.$addressbooks;
|
||||
|
||||
Reference in New Issue
Block a user