mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-24 23:48:13 -05:00
Redirect setup if authenticated
closes #3145 - added beforeModel redirect - added test
This commit is contained in:
parent
c91f062d3e
commit
16343e51e6
1 changed files with 6 additions and 1 deletions
|
@ -2,7 +2,12 @@ import styleBody from 'ghost/mixins/style-body';
|
||||||
import loadingIndicator from 'ghost/mixins/loading-indicator';
|
import loadingIndicator from 'ghost/mixins/loading-indicator';
|
||||||
|
|
||||||
var SetupRoute = Ember.Route.extend(styleBody, loadingIndicator, {
|
var SetupRoute = Ember.Route.extend(styleBody, loadingIndicator, {
|
||||||
classNames: ['ghost-setup']
|
classNames: ['ghost-setup'],
|
||||||
|
beforeModel: function () {
|
||||||
|
if (this.get('session').isAuthenticated) {
|
||||||
|
this.transitionTo(Ember.SimpleAuth.routeAfterAuthentication);
|
||||||
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
export default SetupRoute;
|
export default SetupRoute;
|
||||||
|
|
Loading…
Add table
Reference in a new issue