Perform a hard refresh upon signout.

Closes #3458.
This commit is contained in:
Robert Jackson 2014-07-30 14:14:11 -04:00
parent fe2e3f45c7
commit 7357ece639
No known key found for this signature in database
GPG Key ID: B3D10EF8171F7219

View File

@ -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'],
@ -8,11 +9,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/';
}
});