Ghost/ghost/admin/app/routes/authenticated.js
Hakim Razalan b88a54fb71
🐛 Fixed redirect to signin modal not shown when logged out (#15522)
fixes:  https://github.com/TryGhost/Ghost/issues/15291

- An attempt to improve re-authenticate modal toggle - show re-authenticate modal every time user save (ctrl/cmd + s)
- An attempt to fix redirection when user re-login on different tab. Prevent redirection to sign-in page since the user already logged in on another tab.
- Re-enable `editor` test on `authentication-test.js`
2022-10-21 21:03:12 +01:00

11 lines
282 B
JavaScript

import Route from '@ember/routing/route';
import {inject as service} from '@ember/service';
export default class AuthenticatedRoute extends Route {
@service session;
async beforeModel(transition) {
this.session.requireAuthentication(transition, 'signin');
}
}