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:
Kevin Ansfield 2021-02-04 17:45:16 +00:00
parent 6a14087ccc
commit 5092e936cc
2 changed files with 2 additions and 1 deletions

View File

@ -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');

View File

@ -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();