diff --git a/core/server/data/migrations/versions/4.35/2022-02-02-10-38-add-default-content-visibility-tiers-setting.js b/core/server/data/migrations/versions/4.35/2022-02-02-10-38-add-default-content-visibility-tiers-setting.js new file mode 100644 index 0000000000..af5621dabd --- /dev/null +++ b/core/server/data/migrations/versions/4.35/2022-02-02-10-38-add-default-content-visibility-tiers-setting.js @@ -0,0 +1,8 @@ +const {addSetting} = require('../../utils.js'); + +module.exports = addSetting({ + key: 'default_content_visibility_tiers', + value: '[]', + type: 'array', + group: 'members' +}); diff --git a/core/server/data/schema/default-settings.json b/core/server/data/schema/default-settings.json index 5ebcdfbdfc..8091b60fb9 100644 --- a/core/server/data/schema/default-settings.json +++ b/core/server/data/schema/default-settings.json @@ -235,6 +235,10 @@ "defaultValue": "public", "type": "string" }, + "default_content_visibility_tiers": { + "defaultValue": "[]", + "type": "array" + }, "members_signup_access": { "defaultValue": "all", "validations": { diff --git a/test/regression/api/canary/admin/settings.test.js b/test/regression/api/canary/admin/settings.test.js index fcd5d6f3f0..890ec2ccf8 100644 --- a/test/regression/api/canary/admin/settings.test.js +++ b/test/regression/api/canary/admin/settings.test.js @@ -144,6 +144,11 @@ const defaultSettingsKeyTypes = [ type: 'string', group: 'members' }, + { + key: 'default_content_visibility_tiers', + type: 'array', + group: 'members' + }, { key: 'members_signup_access', type: 'string', diff --git a/test/unit/server/data/exporter/index.test.js b/test/unit/server/data/exporter/index.test.js index c1e02d0643..16ce51d88f 100644 --- a/test/unit/server/data/exporter/index.test.js +++ b/test/unit/server/data/exporter/index.test.js @@ -199,7 +199,7 @@ describe('Exporter', function () { // NOTE: if default settings changed either modify the settings keys blocklist or increase allowedKeysLength // This is a reminder to think about the importer/exporter scenarios ;) - const allowedKeysLength = 84; + const allowedKeysLength = 85; totalKeysLength.should.eql(SETTING_KEYS_BLOCKLIST.length + allowedKeysLength); }); }); diff --git a/test/unit/server/data/schema/integrity.test.js b/test/unit/server/data/schema/integrity.test.js index 7020defee1..906c716263 100644 --- a/test/unit/server/data/schema/integrity.test.js +++ b/test/unit/server/data/schema/integrity.test.js @@ -37,7 +37,7 @@ describe('DB version integrity', function () { // Only these variables should need updating const currentSchemaHash = '9e4eeb5c260047fe21d1f93c523bd771'; const currentFixturesHash = 'beb040c0376a492c2a44767fdd825a3e'; - const currentSettingsHash = 'd73b63e33153c9256bca42ebfd376779'; + const currentSettingsHash = '437d4c6da8759f5c35f11f811b86e5bc'; const currentRoutesHash = '3d180d52c663d173a6be791ef411ed01'; // If this test is failing, then it is likely a change has been made that requires a DB version bump,