mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-01 22:02:11 +03:00
dc9c812d9c
issue https://github.com/TryGhost/Team/issues/857 - The goal is to avoid testing for the owner role only is cases where we should be testing for the owner or admin role - `isOwner` => `isOwnerOnly` - `isAdmin` => `isAdminOnly` - `isOwnerOrAdmin` => `isAdmin` (concerns now both Owner and Admins)
14 lines
374 B
JavaScript
14 lines
374 B
JavaScript
import AuthenticatedRoute from 'ghost-admin/routes/authenticated';
|
|
import {inject as service} from '@ember/service';
|
|
|
|
export default class LaunchRoute extends AuthenticatedRoute {
|
|
@service session;
|
|
|
|
beforeModel() {
|
|
super.beforeModel(...arguments);
|
|
if (!this.session.user.isOwnerOnly) {
|
|
return this.transitionTo('home');
|
|
}
|
|
}
|
|
}
|