From 07a9434bc370bd4f569e6d49bf2586066e108924 Mon Sep 17 00:00:00 2001 From: Arthur Bond Date: Thu, 3 Oct 2024 08:26:00 -0400 Subject: [PATCH 1/2] Adjust session provider early return logic (#164) --- CHANGELOG.md | 4 ++++ node/resolvers/Routes/index.ts | 11 +++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a9358ec..52e046c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [Unreleased] +### Fixed + +- Adjust session provider early return logic + ## [1.44.8] - 2024-10-02 ### Fixed diff --git a/node/resolvers/Routes/index.ts b/node/resolvers/Routes/index.ts index 6950e2a..ddc79ae 100644 --- a/node/resolvers/Routes/index.ts +++ b/node/resolvers/Routes/index.ts @@ -165,14 +165,14 @@ export const Routes = { const ignoreB2B = body?.public?.removeB2B?.value - if (ignoreB2B || !email) { + if (ignoreB2B) { ctx.response.body = response ctx.response.status = 200 return } - if (b2bImpersonate) { + if (email && b2bImpersonate) { try { user = (await getUser({ masterdata, @@ -212,6 +212,13 @@ export const Routes = { email = telemarketingEmail } + if (!email) { + ctx.response.body = response + ctx.response.status = 200 + + return + } + if (user === null) { user = (await getActiveUserByEmail(null, { email }, ctx).catch( (error) => { From 3b54c00b09ade737e1318e9c5fe13b6a5fae0375 Mon Sep 17 00:00:00 2001 From: enzomerca <131273915+enzomerca@users.noreply.github.com> Date: Thu, 3 Oct 2024 12:26:05 +0000 Subject: [PATCH 2/2] Release v1.44.9 --- CHANGELOG.md | 2 ++ manifest.json | 2 +- node/package.json | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 52e046c..e7079c2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [Unreleased] +## [1.44.9] - 2024-10-03 + ### Fixed - Adjust session provider early return logic diff --git a/manifest.json b/manifest.json index 670cf20..2d2b27e 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "name": "storefront-permissions", "vendor": "vtex", - "version": "1.44.8", + "version": "1.44.9", "title": "Storefront Permissions", "description": "Manage User's permissions on apps that relates to this app", "mustUpdateAt": "2022-08-28", diff --git a/node/package.json b/node/package.json index 325a9b7..43034b1 100644 --- a/node/package.json +++ b/node/package.json @@ -1,6 +1,6 @@ { "name": "vtex.checkout-ui-custom", - "version": "1.44.8", + "version": "1.44.9", "dependencies": { "@vtex/api": "6.47.0", "atob": "^2.1.2",