mirror of
https://github.com/documize/community.git
synced 2025-07-22 14:49:42 +02:00
restrict user lists based on account.users permission
This commit is contained in:
parent
b56d3426d2
commit
508ec00c6a
9 changed files with 37 additions and 44 deletions
|
@ -23,15 +23,13 @@ export default Ember.Component.extend(NotifierMixin, {
|
|||
store: service(),
|
||||
|
||||
didReceiveAttrs() {
|
||||
this.get('userService').getAll().then((users) => {
|
||||
this.get('userService').getSpaceUsers(this.get('folder.id')).then((users) => {
|
||||
this.set('users', users);
|
||||
|
||||
// set up users
|
||||
let folderPermissions = [];
|
||||
|
||||
users.forEach((user) => {
|
||||
let isActive = user.get('active');
|
||||
|
||||
let u = {
|
||||
orgId: this.get('folder.orgId'),
|
||||
folderId: this.get('folder.id'),
|
||||
|
@ -48,10 +46,8 @@ export default Ember.Component.extend(NotifierMixin, {
|
|||
documentTemplate: false
|
||||
};
|
||||
|
||||
if (isActive) {
|
||||
let data = this.get('store').normalize('space-permission', u)
|
||||
folderPermissions.pushObject(this.get('store').push(data));
|
||||
}
|
||||
let data = this.get('store').normalize('space-permission', u)
|
||||
folderPermissions.pushObject(this.get('store').push(data));
|
||||
});
|
||||
|
||||
// set up Everyone user
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue