From 92b9c09d0bdb1b7c2b0f576acb19e0f8d9ddaa91 Mon Sep 17 00:00:00 2001 From: Marco Dengel Date: Mon, 11 Dec 2023 15:42:45 +0100 Subject: [PATCH 1/3] chore: update dependencies --- src/ingest/events/post.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ingest/events/post.js b/src/ingest/events/post.js index 4101cabf..dd0348ff 100644 --- a/src/ingest/events/post.js +++ b/src/ingest/events/post.js @@ -22,8 +22,8 @@ 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 +const DTS_INSTITUTION_ALLOW_LIST = ['urn:ard:institution:a3004ff924ece1a2', 'urn:ard:institution:95a02eb6cc4f3d59'] module.exports = async (req, res) => { try { @@ -129,7 +129,7 @@ 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) { + if (!isDtsPluginSet && DTS_INSTITUTION_ALLOW_LIST.includes(req.user.institutionId)) { message.plugins.push({ type: 'dts', isDeactivated: false, From 62c8e7ea1d541764839bf21011053f2a993ce8f1 Mon Sep 17 00:00:00 2001 From: Marco Dengel Date: Mon, 11 Dec 2023 15:48:32 +0100 Subject: [PATCH 2/3] chore: allow dts for SWR and BR --- src/ingest/events/post.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ingest/events/post.js b/src/ingest/events/post.js index dd0348ff..166f112f 100644 --- a/src/ingest/events/post.js +++ b/src/ingest/events/post.js @@ -23,6 +23,7 @@ const DEFAULT_ZONE = 'Europe/Berlin' // feature flags 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) => { From 51a1911bb3e6ad27a716b4a098cd02c61801bb9d Mon Sep 17 00:00:00 2001 From: Marco Dengel Date: Mon, 11 Dec 2023 16:14:12 +0100 Subject: [PATCH 3/3] chore: dts only for type music --- src/ingest/events/post.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ingest/events/post.js b/src/ingest/events/post.js index 166f112f..4734b4de 100644 --- a/src/ingest/events/post.js +++ b/src/ingest/events/post.js @@ -130,7 +130,8 @@ module.exports = async (req, res) => { // add opt-out plugins const isDtsPluginSet = message.plugins?.find((plugin) => plugin.type === 'dts') - if (!isDtsPluginSet && DTS_INSTITUTION_ALLOW_LIST.includes(req.user.institutionId)) { + const isMusic = req.body.type === 'music' + if (!isDtsPluginSet && isMusic && DTS_INSTITUTION_ALLOW_LIST.includes(req.user.institutionId)) { message.plugins.push({ type: 'dts', isDeactivated: false,