mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-28 14:03:48 +03:00
Fixed unauthed access to launch wizard and updated test to use Owner user
refs 6a14087ccc
- `super()` is needed in `beforeModel()` hook so that the AuthenticatedRoute redirect can occur
- launch wizard acceptance test needs to use an Owner user because Admins don't have access
This commit is contained in:
parent
6a14087ccc
commit
5092e936cc
@ -5,6 +5,7 @@ export default class LaunchRoute extends AuthenticatedRoute {
|
||||
@service session;
|
||||
|
||||
beforeModel() {
|
||||
super.beforeModel(...arguments);
|
||||
return this.session.user.then((user) => {
|
||||
if (!user.isOwner) {
|
||||
return this.transitionTo('home');
|
||||
|
@ -16,7 +16,7 @@ describe('Acceptance: Launch flow', function () {
|
||||
|
||||
describe('when logged in', function () {
|
||||
beforeEach(async function () {
|
||||
let role = this.server.create('role', {name: 'Administrator'});
|
||||
let role = this.server.create('role', {name: 'Owner'});
|
||||
this.server.create('user', {roles: [role]});
|
||||
|
||||
return await authenticateSession();
|
||||
|
Loading…
Reference in New Issue
Block a user