1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-25 08:09:43 +02:00

Provide granular Dashbaord/Action view permissions

Closes #154
This commit is contained in:
sauls8t 2018-05-11 15:17:10 +01:00
parent c66fae703c
commit e85744e1b3
5 changed files with 681 additions and 665 deletions

View file

@ -67,6 +67,18 @@ export default SimpleAuthSession.extend({
this.get('session.content.authenticated.user.global') === true;
}),
viewAnalytics: computed('session.content.authenticated.user', function () {
return this.get('session.authenticator') !== 'authenticator:anonymous' &&
this.get('session.content.authenticated.user.id') !== '0' &&
this.get('session.content.authenticated.user.analytics') === true;
}),
viewDashboard: computed('session.content.authenticated.user', function () {
return this.get('session.authenticator') !== 'authenticator:anonymous' &&
this.get('session.content.authenticated.user.id') !== '0' &&
this.get('session.content.authenticated.user.viewUsers') === true;
}),
init() {
this._super(...arguments);