Ghost/core/client/routes/signout.js
Hannah Wolfe 23b2ac07d8 Completed post & user list filer by role
closes #3446, closes #3086

- Authors can only ever get to their own posts
- Editors only ever see authors in the user list
2014-07-31 11:23:37 +01:00

26 lines
762 B
JavaScript

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'],
afterModel: function (model, transition) {
this.notifications.clear();
if (Ember.canInvoke(transition, 'send')) {
transition.send('invalidateSession');
transition.abort();
} else {
this.send('invalidateSession');
}
this.hardRefresh();
},
hardRefresh: function () {
window.location = ghostPaths().adminRoot + '/signin/';
}
});
export default SignoutRoute;