mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-29 07:09:48 +03:00
b540d9f066
no issue The updated dashboard is shelved for now whilst the underlying analytics architecture is improved.
25 lines
551 B
JavaScript
25 lines
551 B
JavaScript
import AuthenticatedRoute from 'ghost-admin/routes/authenticated';
|
|
import {inject as service} from '@ember/service';
|
|
|
|
export default class DashboardRoute extends AuthenticatedRoute {
|
|
@service feature;
|
|
|
|
beforeModel() {
|
|
super.beforeModel(...arguments);
|
|
|
|
if (!this.session.user.isAdmin) {
|
|
return this.transitionTo('site');
|
|
}
|
|
}
|
|
|
|
buildRouteInfoMetadata() {
|
|
return {
|
|
mainClasses: ['gh-main-wide']
|
|
};
|
|
}
|
|
|
|
setupController() {
|
|
this.controller.initialise();
|
|
}
|
|
}
|