From 34beed9e35f725163e1457101c43ace0b6a62a80 Mon Sep 17 00:00:00 2001 From: Oliver Klemenz Date: Mon, 18 Dec 2023 15:25:46 +0100 Subject: [PATCH] CDS 7.5 --- src/index.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/index.js b/src/index.js index cd5c25b..6efd157 100644 --- a/src/index.js +++ b/src/index.js @@ -353,11 +353,7 @@ function cov2ap(options = {}) { req.user = { id: decodeBase64(token).split(":")[0], }; - if ( - req.user.id && - cds.env.requires.auth && - ["basic", "mocked"].includes(cds.env.requires.auth.kind) - ) { + if (req.user.id && cds.env.requires.auth && ["basic", "mocked"].includes(cds.env.requires.auth.kind)) { const user = (cds.env.requires.auth.users || {})[req.user.id]; req.tenant = user && (user.tenant || (user.jwt && user.jwt.zid)); }