mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-15 11:34:24 +03:00
23b2ac07d8
closes #3446, closes #3086 - Authors can only ever get to their own posts - Editors only ever see authors in the user list
26 lines
762 B
JavaScript
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;
|