mirror of
https://github.com/documize/community.git
synced 2025-07-23 15:19:42 +02:00
New user role: view analytics
This commit is contained in:
parent
b65a00dd1c
commit
19a916a4b4
13 changed files with 68 additions and 29 deletions
|
@ -27,7 +27,7 @@ export default Component.extend(AuthProvider, ModalMixin, {
|
|||
init() {
|
||||
this._super(...arguments);
|
||||
this.password = {};
|
||||
this.selectedUsers = [];
|
||||
this.selectedUsers = [];
|
||||
},
|
||||
|
||||
didReceiveAttrs() {
|
||||
|
@ -91,6 +91,13 @@ export default Component.extend(AuthProvider, ModalMixin, {
|
|||
cb(user);
|
||||
},
|
||||
|
||||
toggleAnalytics(id) {
|
||||
let user = this.users.findBy("id", id);
|
||||
user.set('analytics', !user.get('analytics'));
|
||||
let cb = this.get('onSave');
|
||||
cb(user);
|
||||
},
|
||||
|
||||
toggleUsers(id) {
|
||||
let user = this.users.findBy("id", id);
|
||||
user.set('viewUsers', !user.get('viewUsers'));
|
||||
|
@ -208,7 +215,7 @@ export default Component.extend(AuthProvider, ModalMixin, {
|
|||
|
||||
this.get('groupSvc').leave(groupId, userId).then(() => {
|
||||
this.filterUsers();
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
onJoinGroup(groupId) {
|
||||
|
@ -222,7 +229,7 @@ export default Component.extend(AuthProvider, ModalMixin, {
|
|||
|
||||
this.get('groupSvc').join(groupId, userId).then(() => {
|
||||
this.filterUsers();
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue