0
Fork 0
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:
Sebastian Gierlinger 2014-07-01 12:57:44 +02:00
parent c91f062d3e
commit 16343e51e6

View file

@ -2,7 +2,12 @@ import styleBody from 'ghost/mixins/style-body';
import loadingIndicator from 'ghost/mixins/loading-indicator';
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;