mirror of
https://github.com/wassname/talk.git
synced 2026-06-29 04:28:20 +08:00
22 lines
616 B
JavaScript
22 lines
616 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;
|