mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-27 22:49:56 -05:00
Reset/Signin while signed in
no issue - added redirect and notification to reset route - added notification to signup route
This commit is contained in:
parent
cc471aedcb
commit
b3112a4349
2 changed files with 7 additions and 0 deletions
|
@ -3,6 +3,12 @@ import loadingIndicator from 'ghost/mixins/loading-indicator';
|
|||
|
||||
var ResetRoute = Ember.Route.extend(styleBody, loadingIndicator, {
|
||||
classNames: ['ghost-reset'],
|
||||
beforeModel: function () {
|
||||
if (this.get('session').isAuthenticated) {
|
||||
this.notifications.showWarn('You can\'t reset your password while you\'re signed in.', true);
|
||||
this.transitionTo(SimpleAuth.Configuration.routeAfterAuthentication);
|
||||
}
|
||||
},
|
||||
setupController: function (controller, params) {
|
||||
controller.token = params.token;
|
||||
}
|
||||
|
|
|
@ -5,6 +5,7 @@ var SignupRoute = Ember.Route.extend(styleBody, loadingIndicator, {
|
|||
classNames: ['ghost-signup'],
|
||||
beforeModel: function () {
|
||||
if (this.get('session').isAuthenticated) {
|
||||
this.notifications.showWarn('You need to sign out to register as a new user.', true);
|
||||
this.transitionTo(SimpleAuth.Configuration.routeAfterAuthentication);
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Add table
Reference in a new issue