0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-10 23:36:14 -05: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 5c637dd37a
commit 0322de36ee

View file

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