mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-15 03:12:54 +03:00
980c864f68
closes #6514 - removes transition.abort from the signout method because it can override the ember-simple-auth's page refresh
26 lines
603 B
JavaScript
26 lines
603 B
JavaScript
import Ember from 'ember';
|
|
import AuthenticatedRoute from 'ghost/routes/authenticated';
|
|
import styleBody from 'ghost/mixins/style-body';
|
|
|
|
const {
|
|
canInvoke,
|
|
inject: {service}
|
|
} = Ember;
|
|
|
|
export default AuthenticatedRoute.extend(styleBody, {
|
|
titleToken: 'Sign Out',
|
|
|
|
classNames: ['ghost-signout'],
|
|
|
|
notifications: service(),
|
|
|
|
afterModel(model, transition) {
|
|
this.get('notifications').clearAll();
|
|
if (canInvoke(transition, 'send')) {
|
|
transition.send('invalidateSession');
|
|
} else {
|
|
this.send('invalidateSession');
|
|
}
|
|
}
|
|
});
|