mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-28 14:03:48 +03:00
Made launch wizard only accessible to owners
refs https://github.com/TryGhost/Team/issues/460 - member payment settings are only changeable by owners which would leave the wizard being a single step - wizard is designed to be used as one of the first things after initial site setup which will be completed as the owner user
This commit is contained in:
parent
29ae0f734c
commit
6a14087ccc
6
ghost/admin/app/controllers/dashboard.js
Normal file
6
ghost/admin/app/controllers/dashboard.js
Normal file
@ -0,0 +1,6 @@
|
||||
import Controller from '@ember/controller';
|
||||
import {inject as service} from '@ember/service';
|
||||
|
||||
export default class DashboardController extends Controller {
|
||||
@service session;
|
||||
}
|
@ -1,3 +1,14 @@
|
||||
import AuthenticatedRoute from 'ghost-admin/routes/authenticated';
|
||||
import {inject as service} from '@ember/service';
|
||||
|
||||
export default class LaunchRoute extends AuthenticatedRoute {}
|
||||
export default class LaunchRoute extends AuthenticatedRoute {
|
||||
@service session;
|
||||
|
||||
beforeModel() {
|
||||
return this.session.user.then((user) => {
|
||||
if (!user.isOwner) {
|
||||
return this.transitionTo('home');
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -6,6 +6,8 @@
|
||||
</GhCanvasHeader>
|
||||
|
||||
<section class="view-container gh-main-width">
|
||||
<LinkTo @route="launch">Launch site - Finish setup</LinkTo>
|
||||
{{#if this.session.user.isOwner}}
|
||||
<LinkTo @route="launch">Launch site - Finish setup</LinkTo>
|
||||
{{/if}}
|
||||
</section>
|
||||
</section>
|
Loading…
Reference in New Issue
Block a user