diff --git a/CHANGELOG.md b/CHANGELOG.md index 6489e7c..2b3f7f2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Force setProfile to use a valid cost center - Increase timeout to 45 seconds +## [1.44.9] - 2024-10-03 + +### Fixed + +- Adjust session provider early return logic + ## [1.44.8] - 2024-10-02 ### Fixed 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", diff --git a/node/resolvers/Routes/index.ts b/node/resolvers/Routes/index.ts index 50d5fd0..ba5a2f1 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, @@ -211,6 +211,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) => {