mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-24 11:22:19 +03:00
cf7a763199
refs https://github.com/TryGhost/Admin/pull/1901 Ember has deprecated mixins in preparation for 4.0 and `ember-simple-auth` has now done the same in 3.1.0. - removed all imports of Ember Simple Auth mixins - moved authenticated and invalidated handling from application route to session service - moved server-notification loading from application route to session service - updated `AuthenticatedRoute` to use the session service directly rather than authenticated route mixin - added `UnauthenticatedRoute` that incorporates the behaviour from our overridden `UnauthenticatedRouteMixin` and switches to using the session service directly
11 lines
254 B
JavaScript
11 lines
254 B
JavaScript
import Route from '@ember/routing/route';
|
|
import {inject as service} from '@ember/service';
|
|
|
|
export default Route.extend({
|
|
session: service(),
|
|
|
|
beforeModel(transition) {
|
|
this.session.requireAuthentication(transition, 'signin');
|
|
}
|
|
});
|