mirror of
https://github.com/documize/community.git
synced 2025-08-02 20:15:26 +02:00
Improve Space permissions
Closes out loopholes that allowed managers to kick owners.
This commit is contained in:
parent
09635b67ab
commit
5d632712e0
30 changed files with 1015 additions and 877 deletions
|
@ -62,6 +62,15 @@ export default Component.extend(ModalMixin, TooltipMixin, Notifer, {
|
|||
cat.set('documents', docCount);
|
||||
cat.set('users', userCount);
|
||||
});
|
||||
|
||||
this.get('categorySvc').getUserVisible(this.get('space.id')).then((cm) => {
|
||||
cm.forEach((cm) => {
|
||||
let cat = _.findWhere(c, {id: cm.get('id') });
|
||||
if (is.not.undefined(cat)) {
|
||||
cat.set('access', is.not.undefined(cat));
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
},
|
||||
|
|
|
@ -34,6 +34,9 @@ export default Component.extend(Notifier, Modals, {
|
|||
isSpaceAdmin: computed('permissions', function() {
|
||||
return this.get('permissions.spaceOwner') || this.get('permissions.spaceManage');
|
||||
}),
|
||||
isNotSpaceOwner: computed('permissions', function() {
|
||||
return !this.get('permissions.spaceOwner');
|
||||
}),
|
||||
|
||||
didReceiveAttrs() {
|
||||
this._super(...arguments);
|
||||
|
|
|
@ -29,7 +29,6 @@ export default Component.extend(AuthMixin, {
|
|||
|
||||
init() {
|
||||
this._super(...arguments);
|
||||
// this.filteredDocs = [];
|
||||
this.setup();
|
||||
},
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue