mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-30 11:54:33 +03:00
f9d30ff9c8
no issue - https://github.com/ember-cli/eslint-plugin-ember/blob/master/docs/rules/use-brace-expansion.md
22 lines
842 B
JavaScript
22 lines
842 B
JavaScript
import Controller from '@ember/controller';
|
|
import {computed} from '@ember/object';
|
|
import {inject as service} from '@ember/service';
|
|
|
|
export default Controller.extend({
|
|
dropdown: service(),
|
|
session: service(),
|
|
settings: service(),
|
|
ui: service(),
|
|
|
|
showNavMenu: computed('currentPath', 'session.{isAuthenticated,user.isFulfilled}', function () {
|
|
// we need to defer showing the navigation menu until the session.user
|
|
// promise has fulfilled so that gh-user-can-admin has the correct data
|
|
if (!this.get('session.isAuthenticated') || !this.get('session.user.isFulfilled')) {
|
|
return false;
|
|
}
|
|
|
|
return (this.get('currentPath') !== 'error404' || this.get('session.isAuthenticated'))
|
|
&& !this.get('currentPath').match(/(signin|signup|setup|reset)/);
|
|
})
|
|
});
|