mirror of
https://github.com/wassname/talk.git
synced 2026-06-30 01:41:13 +08:00
20 lines
607 B
JavaScript
20 lines
607 B
JavaScript
const { VIEW_PROTECTED_SETTINGS } = require('../../perms/constants');
|
|
|
|
const { decorateWithPermissionCheck } = require('./util');
|
|
|
|
const Settings = {};
|
|
|
|
// PROTECTED_SETTINGS are the settings keys that must be protected for only some
|
|
// eyes.
|
|
const PROTECTED_SETTINGS = {
|
|
premodLinksEnable: [VIEW_PROTECTED_SETTINGS],
|
|
autoCloseStream: [VIEW_PROTECTED_SETTINGS],
|
|
wordlist: [VIEW_PROTECTED_SETTINGS],
|
|
domains: [VIEW_PROTECTED_SETTINGS],
|
|
};
|
|
|
|
// decorate the fields on the settings resolver with a permission check.
|
|
decorateWithPermissionCheck(Settings, PROTECTED_SETTINGS);
|
|
|
|
module.exports = Settings;
|