mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-29 15:12:58 +03:00
Merge pull request #3440 from sebgie/notification-reset-invite
Reset/Signin while signed in
This commit is contained in:
commit
b6d7afe9ad
@ -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…
Reference in New Issue
Block a user