Merge pull request #3172 from sebgie/issue#3145

Redirect setup if authenticated
This commit is contained in:
Hannah Wolfe 2014-07-01 13:57:56 +01:00
commit 82845686c3

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;