Skip to content

Commit

Permalink
CDS 7.5
Browse files Browse the repository at this point in the history
  • Loading branch information
oklemenz2 committed Dec 18, 2023
1 parent 8b09d27 commit 34beed9
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
Expand Down

0 comments on commit 34beed9

Please sign in to comment.