Merge pull request #3463 from rwjblue/hard-refresh

Perform a hard refresh upon signout.
This commit is contained in:
Hannah Wolfe 2014-07-30 22:28:27 +01:00
commit c3308fbe2d

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