mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-28 21:33:24 +03:00
5d22b788c8
refs #10318 * Updated settings model with new settings * Removed parseSubscriptionSettings from settings service * Updated members-utils to use new settings * Updated labs controller to use new settings * Fixed dependency for member-settings-form * Updated members-lab-setting component to use new settings * Updated disconnect modal to use new settings * Updated members portal modal to use new settings * Removed Direct from settings * Renamed members_allow_signup -> members_allow_free_signup * Allowed for null fromAddress
21 lines
663 B
JavaScript
21 lines
663 B
JavaScript
import Service from '@ember/service';
|
|
import {inject as service} from '@ember/service';
|
|
|
|
export default class MembersUtilsService extends Service {
|
|
@service settings;
|
|
@service config;
|
|
|
|
get isStripeEnabled() {
|
|
const stripeDirect = this.config.get('stripeDirect');
|
|
|
|
const hasDirectKeys = !!this.settings.get('stripeSecretKey') && !!this.settings.get('stripePublishableKey');
|
|
const hasConnectKeys = !!this.settings.get('stripeConnectSecretKey') && !!this.settings.get('stripeConnectPublishableKey');
|
|
|
|
if (stripeDirect) {
|
|
return hasDirectKeys;
|
|
}
|
|
|
|
return hasConnectKeys || hasDirectKeys;
|
|
}
|
|
}
|