mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-23 10:53:34 +03:00
Added settings keys to store OAuth related data (#12879)
refs https://github.com/TryGhost/Team/issues/618 - The `oauth_client_id` and `oauth_client_secret` are placeholders to store OAuths related data. - The flag for `oauth_enabled` or anything along those lines was not added intentionally in favour of checking if the `oauth_client_id` & `oauth_client_secret` are null.
This commit is contained in:
parent
8fbcf26d08
commit
d964224312
@ -12,7 +12,8 @@ const groupTypeMapping = {
|
||||
portal: 'portal',
|
||||
email: 'bulk_email',
|
||||
newsletter: 'newsletter',
|
||||
firstpromoter: 'firstpromoter'
|
||||
firstpromoter: 'firstpromoter',
|
||||
oauth: 'oauth'
|
||||
};
|
||||
|
||||
const mapGroupToType = (group) => {
|
||||
|
@ -12,7 +12,8 @@ const groupTypeMapping = {
|
||||
portal: 'portal',
|
||||
email: 'bulk_email',
|
||||
newsletter: 'newsletter',
|
||||
firstpromoter: 'firstpromoter'
|
||||
firstpromoter: 'firstpromoter',
|
||||
oauth: 'oauth'
|
||||
};
|
||||
|
||||
const mapGroupToType = (group) => {
|
||||
|
@ -12,7 +12,8 @@ const groupTypeMapping = {
|
||||
portal: 'portal',
|
||||
email: 'bulk_email',
|
||||
newsletter: 'newsletter',
|
||||
firstpromoter: 'firstpromoter'
|
||||
firstpromoter: 'firstpromoter',
|
||||
oauth: 'oauth'
|
||||
};
|
||||
|
||||
const mapGroupToType = (group) => {
|
||||
|
@ -69,7 +69,9 @@ const SETTING_KEYS_BLOCKLIST = [
|
||||
'stripe_secret_key',
|
||||
'stripe_publishable_key',
|
||||
'members_stripe_webhook_id',
|
||||
'members_stripe_webhook_secret'
|
||||
'members_stripe_webhook_secret',
|
||||
'oauth_client_id',
|
||||
'oauth_client_secret'
|
||||
];
|
||||
|
||||
const modelOptions = {context: {internal: true}};
|
||||
|
@ -467,5 +467,15 @@
|
||||
"defaultValue": "",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"oauth": {
|
||||
"oauth_client_id" : {
|
||||
"defaultValue": null,
|
||||
"type": "string"
|
||||
},
|
||||
"oauth_client_secret" : {
|
||||
"defaultValue": null,
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -77,7 +77,9 @@ const defaultSettingsKeyTypes = [
|
||||
{key: 'newsletter_body_font_category', type: 'newsletter'},
|
||||
{key: 'newsletter_footer_content', type: 'newsletter'},
|
||||
{key: 'firstpromoter', type: 'firstpromoter'},
|
||||
{key: 'firstpromoter_id', type: 'firstpromoter'}
|
||||
{key: 'firstpromoter_id', type: 'firstpromoter'},
|
||||
{key: 'oauth_client_id', type: 'oauth'},
|
||||
{key: 'oauth_client_secret', type: 'oauth'}
|
||||
];
|
||||
|
||||
describe('Settings API (canary)', function () {
|
||||
|
@ -71,7 +71,9 @@ const defaultSettingsKeyTypes = [
|
||||
{key: 'newsletter_footer_content', type: 'newsletter'},
|
||||
{key: 'newsletter_body_font_category', type: 'newsletter'},
|
||||
{key: 'firstpromoter', type: 'firstpromoter'},
|
||||
{key: 'firstpromoter_id', type: 'firstpromoter'}
|
||||
{key: 'firstpromoter_id', type: 'firstpromoter'},
|
||||
{key: 'oauth_client_id', type: 'oauth'},
|
||||
{key: 'oauth_client_secret', type: 'oauth'}
|
||||
];
|
||||
|
||||
describe('Settings API (v2)', function () {
|
||||
|
@ -75,7 +75,9 @@ const defaultSettingsKeyTypes = [
|
||||
{key: 'newsletter_body_font_category', type: 'newsletter'},
|
||||
{key: 'newsletter_footer_content', type: 'newsletter'},
|
||||
{key: 'firstpromoter', type: 'firstpromoter'},
|
||||
{key: 'firstpromoter_id', type: 'firstpromoter'}
|
||||
{key: 'firstpromoter_id', type: 'firstpromoter'},
|
||||
{key: 'oauth_client_id', type: 'oauth'},
|
||||
{key: 'oauth_client_secret', type: 'oauth'}
|
||||
];
|
||||
|
||||
describe('Settings API (v3)', function () {
|
||||
|
@ -34,7 +34,7 @@ describe('DB version integrity', function () {
|
||||
// Only these variables should need updating
|
||||
const currentSchemaHash = '19f3f2750320798dac398be2eb51d3e5';
|
||||
const currentFixturesHash = '3dc9747eadecec34958dfba14c5332db';
|
||||
const currentSettingsHash = '7ac732b994a5bb1565f88c8a84872964';
|
||||
const currentSettingsHash = 'b7c859988a6195db8daf8cfa8a65b171';
|
||||
const currentRoutesHash = '3d180d52c663d173a6be791ef411ed01';
|
||||
|
||||
// If this test is failing, then it is likely a change has been made that requires a DB version bump,
|
||||
|
Loading…
Reference in New Issue
Block a user