1
0
Fork 0
mirror of https://github.com/TryGhost/Ghost-Admin.git synced 2023-12-14 02:33:04 +01:00

Fix missing redirect on settings/code-injection when not authenticated

related issue #5412
- code-injection route was overriding `beforeModel` without calling `super` which meant the redirect handling added in `AuthenticatedRoute` was being skipped
This commit is contained in:
Kevin Ansfield 2015-07-22 11:11:42 +01:00
parent ca560d5575
commit 820bc3d3f1

View file

@ -6,7 +6,8 @@ export default AuthenticatedRoute.extend(styleBody, CurrentUserSettings, {
titleToken: 'Settings - Code Injection',
classNames: ['settings-view-code'],
beforeModel: function () {
beforeModel: function (transition) {
this._super(transition);
return this.get('session.user')
.then(this.transitionAuthor())
.then(this.transitionEditor());