diff --git a/src/ingest/events/post.js b/src/ingest/events/post.js index 4101cabf..4734b4de 100644 --- a/src/ingest/events/post.js +++ b/src/ingest/events/post.js @@ -22,8 +22,9 @@ const source = 'ingest/events/post' const DEFAULT_ZONE = 'Europe/Berlin' // feature flags -const IS_DTS_OPT_OUT_ENABLED = false const IS_COMMON_TOPIC_ENABLED = true +// allow DTS for SWR (a3004ff924ece1a2) and BR (95a02eb6cc4f3d59) +const DTS_INSTITUTION_ALLOW_LIST = ['urn:ard:institution:a3004ff924ece1a2', 'urn:ard:institution:95a02eb6cc4f3d59'] module.exports = async (req, res) => { try { @@ -129,7 +130,8 @@ module.exports = async (req, res) => { // add opt-out plugins const isDtsPluginSet = message.plugins?.find((plugin) => plugin.type === 'dts') - if (!isDtsPluginSet && IS_DTS_OPT_OUT_ENABLED) { + const isMusic = req.body.type === 'music' + if (!isDtsPluginSet && isMusic && DTS_INSTITUTION_ALLOW_LIST.includes(req.user.institutionId)) { message.plugins.push({ type: 'dts', isDeactivated: false,