mirror of
https://github.com/documize/community.git
synced 2025-08-02 20:15:26 +02:00
parent
c66fae703c
commit
e85744e1b3
5 changed files with 681 additions and 665 deletions
|
@ -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);
|
||||
|
||||
|
|
|
@ -4,8 +4,10 @@
|
|||
{{#link-to "folders" class=(if (eq selectItem 'spaces') 'link selected' 'link') tagName="li"}}Spaces{{/link-to}}
|
||||
{{/if}}
|
||||
{{#if (eq appMeta.edition 'Enterprise')}}
|
||||
{{#if session.isEditor}}
|
||||
{{#if session.viewDashboard}}
|
||||
{{#link-to "dashboard" class=(if (eq selectItem 'dashboard') 'link selected' 'link') tagName="li"}}Actions{{/link-to}}
|
||||
{{/if}}
|
||||
{{#if session.viewAnalytics}}
|
||||
{{#link-to "analytics" class=(if (eq selectItem 'analytics') 'link selected' 'link') tagName="li"}}Insights{{/link-to}}
|
||||
{{/if}}
|
||||
{{#link-to "folders" class=(if (eq selectItem 'spaces') 'link selected' 'link') tagName="li"}}Spaces{{/link-to}}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue