mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-05 18:34:39 +03:00
Merge pull request #3463 from rwjblue/hard-refresh
Perform a hard refresh upon signout.
This commit is contained in:
commit
c3308fbe2d
@ -1,5 +1,6 @@
|
||||
import styleBody from 'ghost/mixins/style-body';
|
||||
import loadingIndicator from 'ghost/mixins/loading-indicator';
|
||||
import ghostPaths from 'ghost/utils/ghost-paths';
|
||||
|
||||
var SignoutRoute = Ember.Route.extend(SimpleAuth.AuthenticatedRouteMixin, styleBody, loadingIndicator, {
|
||||
classNames: ['ghost-signout'],
|
||||
@ -9,11 +10,15 @@ var SignoutRoute = Ember.Route.extend(SimpleAuth.AuthenticatedRouteMixin, styleB
|
||||
if (Ember.canInvoke(transition, 'send')) {
|
||||
transition.send('invalidateSession');
|
||||
transition.abort();
|
||||
this.transitionTo('signin');
|
||||
this.hardRefresh();
|
||||
} else {
|
||||
this.send('invalidateSession');
|
||||
this.transitionTo('signin');
|
||||
this.hardRefresh();
|
||||
}
|
||||
},
|
||||
|
||||
hardRefresh: function () {
|
||||
window.location = ghostPaths().adminRoot + '/signin/';
|
||||
}
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user