Updated default redirect for contributors
This commit is contained in:
parent
87738cb5de
commit
b5995419dc
@ -91,7 +91,11 @@ export default class Main extends Component.extend(ShortcutsMixin) {
|
||||
if (currentRouteName === 'site') {
|
||||
getOwner(this).lookup(`route:${currentRouteName}`).refresh();
|
||||
} else {
|
||||
this.router.transitionTo('site');
|
||||
if (this.session.user.isContributor) {
|
||||
this.router.transitionTo('posts');
|
||||
} else {
|
||||
this.router.transitionTo('site');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4,7 +4,9 @@ export default class DashboardRoute extends AuthenticatedRoute {
|
||||
beforeModel() {
|
||||
super.beforeModel(...arguments);
|
||||
|
||||
if (!this.session.user.isAdmin) {
|
||||
if (this.session.user.isContributor) {
|
||||
return this.transitionTo('posts');
|
||||
} else if (!this.session.user.isAdmin) {
|
||||
return this.transitionTo('site');
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user