mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-03-11 02:12:21 -05:00
Removed API filter of settings now correctly grouped in "core"
refs https://github.com/TryGhost/Ghost/issues/10318 - `members_public_key` and `members_private_key` are now correctly grouped under `core` which is already filtered out so we don't need the extra filter to exclude them
This commit is contained in:
parent
8fc526ff6e
commit
e9b6e8eca7
2 changed files with 2 additions and 14 deletions
|
@ -8,11 +8,6 @@ const {BadRequestError, NoPermissionError, NotFoundError} = require('@tryghost/e
|
|||
const settingsCache = require('../../services/settings/cache');
|
||||
const membersService = require('../../services/members');
|
||||
|
||||
const SETTINGS_BLACKLIST = [
|
||||
'members_public_key',
|
||||
'members_private_key'
|
||||
];
|
||||
|
||||
module.exports = {
|
||||
docName: 'settings',
|
||||
|
||||
|
@ -33,8 +28,7 @@ module.exports = {
|
|||
if (!frame.options.context.internal) {
|
||||
settings = _.filter(settings, (setting) => {
|
||||
const isCore = setting.group === 'core';
|
||||
const isBlacklisted = SETTINGS_BLACKLIST.includes(setting.key);
|
||||
return !isBlacklisted && !isCore;
|
||||
return !isCore;
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -6,11 +6,6 @@ const {i18n} = require('../../lib/common');
|
|||
const {NoPermissionError, NotFoundError} = require('@tryghost/errors');
|
||||
const settingsCache = require('../../services/settings/cache');
|
||||
|
||||
const SETTINGS_BLACKLIST = [
|
||||
'members_public_key',
|
||||
'members_private_key'
|
||||
];
|
||||
|
||||
module.exports = {
|
||||
docName: 'settings',
|
||||
|
||||
|
@ -31,8 +26,7 @@ module.exports = {
|
|||
if (!frame.options.context.internal) {
|
||||
settings = _.filter(settings, (setting) => {
|
||||
const isCore = setting.type === 'core';
|
||||
const isBlacklisted = SETTINGS_BLACKLIST.includes(setting.key);
|
||||
return !isBlacklisted && !isCore;
|
||||
return !isCore;
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue