2021-01-21 12:11:51 +03:00
|
|
|
import AuthenticatedRoute from 'ghost-admin/routes/authenticated';
|
|
|
|
|
|
|
|
export default class DashboardRoute extends AuthenticatedRoute {
|
2021-02-24 17:33:00 +03:00
|
|
|
beforeModel() {
|
|
|
|
super.beforeModel(...arguments);
|
2021-07-12 15:55:56 +03:00
|
|
|
if (!this.session.user.isAdmin) {
|
2021-07-08 16:37:31 +03:00
|
|
|
return this.transitionTo('site');
|
|
|
|
}
|
2021-02-24 17:33:00 +03:00
|
|
|
}
|
|
|
|
|
2021-02-16 20:12:24 +03:00
|
|
|
buildRouteInfoMetadata() {
|
|
|
|
return {
|
|
|
|
mainClasses: ['gh-main-wide']
|
|
|
|
};
|
|
|
|
}
|
2021-02-23 17:34:13 +03:00
|
|
|
|
|
|
|
setupController() {
|
|
|
|
this.controller.initialise();
|
|
|
|
}
|
2021-01-21 12:11:51 +03:00
|
|
|
}
|