mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-05 18:34:39 +03:00
Redirect signin if authenticated
closes #3147 - added beforeModel redirect - added test
This commit is contained in:
parent
c91f062d3e
commit
484e5d39e1
@ -3,6 +3,11 @@ import loadingIndicator from 'ghost/mixins/loading-indicator';
|
||||
|
||||
var SigninRoute = Ember.Route.extend(styleBody, loadingIndicator, {
|
||||
classNames: ['ghost-login'],
|
||||
beforeModel: function () {
|
||||
if (this.get('session').isAuthenticated) {
|
||||
this.transitionTo(Ember.SimpleAuth.routeAfterAuthentication);
|
||||
}
|
||||
},
|
||||
actions: {
|
||||
sessionAuthenticationFailed: function (error) {
|
||||
this.notifications.showError(error.message);
|
||||
|
Loading…
Reference in New Issue
Block a user