mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-03 23:00:14 -05:00
Added comments_enabled
setting
refs https://github.com/TryGhost/Team/issues/1664 - comments are disabled by default, but can be enabled on any site
This commit is contained in:
parent
301ae61aa9
commit
b88212b603
5 changed files with 26 additions and 3 deletions
|
@ -55,7 +55,8 @@ const EDITABLE_SETTINGS = [
|
||||||
'accent_color',
|
'accent_color',
|
||||||
'editor_default_email_recipients',
|
'editor_default_email_recipients',
|
||||||
'editor_default_email_recipients_filter',
|
'editor_default_email_recipients_filter',
|
||||||
'labs'
|
'labs',
|
||||||
|
'comments_enabled'
|
||||||
];
|
];
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
const {addSetting} = require('../../utils');
|
||||||
|
|
||||||
|
module.exports = addSetting({
|
||||||
|
key: 'comments_enabled',
|
||||||
|
value: 'off',
|
||||||
|
type: 'string',
|
||||||
|
group: 'comments'
|
||||||
|
});
|
|
@ -450,5 +450,19 @@
|
||||||
"defaultValue": "all",
|
"defaultValue": "all",
|
||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"comments": {
|
||||||
|
"comments_enabled": {
|
||||||
|
"type": "string",
|
||||||
|
"defaultValue": "off",
|
||||||
|
"validations": {
|
||||||
|
"isEmpty": false,
|
||||||
|
"isIn": [[
|
||||||
|
"off",
|
||||||
|
"all",
|
||||||
|
"paid"
|
||||||
|
]]
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -234,7 +234,7 @@ describe('Exporter', function () {
|
||||||
|
|
||||||
// NOTE: if default settings changed either modify the settings keys blocklist or increase allowedKeysLength
|
// 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 ;)
|
// This is a reminder to think about the importer/exporter scenarios ;)
|
||||||
const allowedKeysLength = 69;
|
const allowedKeysLength = 70;
|
||||||
totalKeysLength.should.eql(SETTING_KEYS_BLOCKLIST.length + allowedKeysLength);
|
totalKeysLength.should.eql(SETTING_KEYS_BLOCKLIST.length + allowedKeysLength);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -37,7 +37,7 @@ describe('DB version integrity', function () {
|
||||||
// Only these variables should need updating
|
// Only these variables should need updating
|
||||||
const currentSchemaHash = 'c85378b0bbd7d5eeb1fff39796c30886';
|
const currentSchemaHash = 'c85378b0bbd7d5eeb1fff39796c30886';
|
||||||
const currentFixturesHash = '1d6562a1963a9b9d10d06070d537f11f';
|
const currentFixturesHash = '1d6562a1963a9b9d10d06070d537f11f';
|
||||||
const currentSettingsHash = '0b138cdd40e48b5b7dc4ebac2a7819a7';
|
const currentSettingsHash = 'd54210758b7054e2174fd34aa2320ad7';
|
||||||
const currentRoutesHash = '3d180d52c663d173a6be791ef411ed01';
|
const currentRoutesHash = '3d180d52c663d173a6be791ef411ed01';
|
||||||
|
|
||||||
// If this test is failing, then it is likely a change has been made that requires a DB version bump,
|
// If this test is failing, then it is likely a change has been made that requires a DB version bump,
|
||||||
|
|
Loading…
Add table
Reference in a new issue