diff --git a/core/server/api/canary/utils/serializers/output/utils/settings-type-group-mapper.js b/core/server/api/canary/utils/serializers/output/utils/settings-type-group-mapper.js index 677cb22844..46bc7cf236 100644 --- a/core/server/api/canary/utils/serializers/output/utils/settings-type-group-mapper.js +++ b/core/server/api/canary/utils/serializers/output/utils/settings-type-group-mapper.js @@ -13,7 +13,8 @@ const groupTypeMapping = { email: 'bulk_email', newsletter: 'newsletter', firstpromoter: 'firstpromoter', - oauth: 'oauth' + oauth: 'oauth', + editor: 'editor' }; const mapGroupToType = (group) => { diff --git a/core/server/api/v2/utils/serializers/output/utils/settings-type-group-mapper.js b/core/server/api/v2/utils/serializers/output/utils/settings-type-group-mapper.js index 677cb22844..46bc7cf236 100644 --- a/core/server/api/v2/utils/serializers/output/utils/settings-type-group-mapper.js +++ b/core/server/api/v2/utils/serializers/output/utils/settings-type-group-mapper.js @@ -13,7 +13,8 @@ const groupTypeMapping = { email: 'bulk_email', newsletter: 'newsletter', firstpromoter: 'firstpromoter', - oauth: 'oauth' + oauth: 'oauth', + editor: 'editor' }; const mapGroupToType = (group) => { diff --git a/core/server/api/v3/utils/serializers/output/utils/settings-type-group-mapper.js b/core/server/api/v3/utils/serializers/output/utils/settings-type-group-mapper.js index 677cb22844..46bc7cf236 100644 --- a/core/server/api/v3/utils/serializers/output/utils/settings-type-group-mapper.js +++ b/core/server/api/v3/utils/serializers/output/utils/settings-type-group-mapper.js @@ -13,7 +13,8 @@ const groupTypeMapping = { email: 'bulk_email', newsletter: 'newsletter', firstpromoter: 'firstpromoter', - oauth: 'oauth' + oauth: 'oauth', + editor: 'editor' }; const mapGroupToType = (group) => { diff --git a/core/server/data/schema/default-settings.json b/core/server/data/schema/default-settings.json index bd32dd98d9..7e64746a06 100644 --- a/core/server/data/schema/default-settings.json +++ b/core/server/data/schema/default-settings.json @@ -477,5 +477,23 @@ "defaultValue": null, "type": "string" } + }, + "editor": { + "editor_default_email_recipients": { + "defaultValue": "visibility", + "type": "string", + "validations": { + "isEmpty": false, + "isIn": [[ + "disabled", + "visibility", + "filter" + ]] + } + }, + "editor_default_email_recipients_filter": { + "defaultValue": "all", + "type": "string" + } } } diff --git a/test/regression/api/canary/admin/settings_spec.js b/test/regression/api/canary/admin/settings_spec.js index eb177b6a80..fd753426f7 100644 --- a/test/regression/api/canary/admin/settings_spec.js +++ b/test/regression/api/canary/admin/settings_spec.js @@ -79,7 +79,9 @@ const defaultSettingsKeyTypes = [ {key: 'firstpromoter', type: 'firstpromoter'}, {key: 'firstpromoter_id', type: 'firstpromoter'}, {key: 'oauth_client_id', type: 'oauth'}, - {key: 'oauth_client_secret', type: 'oauth'} + {key: 'oauth_client_secret', type: 'oauth'}, + {key: 'editor_default_email_recipients', type: 'editor'}, + {key: 'editor_default_email_recipients_filter', type: 'editor'} ]; describe('Settings API (canary)', function () { diff --git a/test/regression/api/v2/admin/settings_spec.js b/test/regression/api/v2/admin/settings_spec.js index 41b6bd9b76..68c107b1c6 100644 --- a/test/regression/api/v2/admin/settings_spec.js +++ b/test/regression/api/v2/admin/settings_spec.js @@ -73,7 +73,9 @@ const defaultSettingsKeyTypes = [ {key: 'firstpromoter', type: 'firstpromoter'}, {key: 'firstpromoter_id', type: 'firstpromoter'}, {key: 'oauth_client_id', type: 'oauth'}, - {key: 'oauth_client_secret', type: 'oauth'} + {key: 'oauth_client_secret', type: 'oauth'}, + {key: 'editor_default_email_recipients', type: 'editor'}, + {key: 'editor_default_email_recipients_filter', type: 'editor'} ]; describe('Settings API (v2)', function () { diff --git a/test/regression/api/v3/admin/settings_spec.js b/test/regression/api/v3/admin/settings_spec.js index c5d2e2db4b..448fa3ec99 100644 --- a/test/regression/api/v3/admin/settings_spec.js +++ b/test/regression/api/v3/admin/settings_spec.js @@ -77,7 +77,9 @@ const defaultSettingsKeyTypes = [ {key: 'firstpromoter', type: 'firstpromoter'}, {key: 'firstpromoter_id', type: 'firstpromoter'}, {key: 'oauth_client_id', type: 'oauth'}, - {key: 'oauth_client_secret', type: 'oauth'} + {key: 'oauth_client_secret', type: 'oauth'}, + {key: 'editor_default_email_recipients', type: 'editor'}, + {key: 'editor_default_email_recipients_filter', type: 'editor'} ]; describe('Settings API (v3)', function () { diff --git a/test/unit/data/schema/integrity_spec.js b/test/unit/data/schema/integrity_spec.js index 035618850c..2fbffd245a 100644 --- a/test/unit/data/schema/integrity_spec.js +++ b/test/unit/data/schema/integrity_spec.js @@ -34,7 +34,7 @@ describe('DB version integrity', function () { // Only these variables should need updating const currentSchemaHash = 'b7bca80554f3946cd2f83e0e99ff3532'; const currentFixturesHash = 'b24801cf9f819e4c127316021877ad70'; - const currentSettingsHash = 'b943cc3956eee3dd042f8394b2701d21'; + const currentSettingsHash = 'c202cf5780aa77d8730a82680e2b142e'; const currentRoutesHash = '3d180d52c663d173a6be791ef411ed01'; // If this test is failing, then it is likely a change has been made that requires a DB version bump,