Disabled stripe connect for non-owner users in Portal settings

refs https://github.com/TryGhost/Team/issues/994

Non-owner admin users have visibility of the "Connect with Stripe" UI in Admin, but lack permissions to setup the Stripe session in order to actually connect Stripe. This change patches the Portal settings UI by disabling Stripe Connect option for non-owner admins.
This commit is contained in:
Rishabh 2021-08-17 15:33:29 +05:30
parent e52bdf88f9
commit 7394df6137
2 changed files with 2 additions and 1 deletions

View File

@ -131,7 +131,7 @@
</div>
{{else}}
<div class="gh-portal-setting-no-stripe">
You need to <button class="gh-btn gh-btn-link black" {{on "click" (action "openStripeSettings")}}>connect to Stripe</button> to take payments
You need to <button class="gh-btn gh-btn-link black {{if (not this.session.user.isOwnerOnly) "disabled"}}" {{on "click" (action "openStripeSettings")}}>connect to Stripe</button> to take payments
</div>
{{/if}}
</div>

View File

@ -12,6 +12,7 @@ export default ModalComponent.extend({
membersUtils: service(),
settings: service(),
store: service(),
session: service(),
page: 'signup',
iconExtensions: null,