From 3d4670fce9252b04ff301576124521bad3c1b120 Mon Sep 17 00:00:00 2001 From: Arthur Bond Date: Wed, 2 Oct 2024 09:49:06 -0400 Subject: [PATCH 1/2] Session: return early if storeUserEmail is not populated (#163) --- CHANGELOG.md | 16 ++++++++++++++++ node/resolvers/Routes/index.ts | 9 +-------- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 60762ef..c21364f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,64 +7,80 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [Unreleased] +### Fixed + +- In session provider, return early if storeUserEmail is not populated + ## [1.44.7] - 2024-09-25 ### Fixed + - Remove unnecessary b2b_users storage on vbase ## [1.44.6] - 2024-09-05 ### Fixed + - Add await to requests to properly handle inactive organizations on login ## [1.44.5] - 2024-09-04 ### Fixed + - Provide app token on calls to b2b-organizations-graphql app ## [1.44.4] - 2024-09-03 ### Fixed + - Add sort to searchDocumentsWithPaginationInfo at getAllUsers ## [1.44.3] - 2024-08-22 ### Fixed + - add new auth metric field ## [1.44.2] - 2024-08-21 ### Fixed + - addUser function to not accept invalid cost center ## [1.44.1] - 2024-08-19 ### Added + - Session audit metrics ## [1.44.0] - 2024-08-14 ### Changed + - Changed the token validation directive of some operations ## [1.43.5] - 2024-08-08 ### Fixed + - Storefront considers the active organizations when setting the user's profile ## [1.43.4] - 2024-08-07 ### Changed + - Changed the token validation directive of some operations ## [1.43.3] - 2024-07-31 ### Changed + - Changed the token validation directive of some operations ## [1.43.2] - 2024-07-29 ### Added + - Add enforcement of new validation for admin and api tokens - Add more details to admin and api token validation metric diff --git a/node/resolvers/Routes/index.ts b/node/resolvers/Routes/index.ts index 35dab2d..6950e2a 100644 --- a/node/resolvers/Routes/index.ts +++ b/node/resolvers/Routes/index.ts @@ -165,7 +165,7 @@ export const Routes = { const ignoreB2B = body?.public?.removeB2B?.value - if (ignoreB2B) { + if (ignoreB2B || !email) { ctx.response.body = response ctx.response.status = 200 @@ -212,13 +212,6 @@ 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 2bc7c78e0adab1eb3e6c828840974e3e18ca535f Mon Sep 17 00:00:00 2001 From: enzomerca <131273915+enzomerca@users.noreply.github.com> Date: Wed, 2 Oct 2024 13:49:11 +0000 Subject: [PATCH 2/2] Release v1.44.8 --- 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 c21364f..a9358ec 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.8] - 2024-10-02 + ### Fixed - In session provider, return early if storeUserEmail is not populated diff --git a/manifest.json b/manifest.json index 948f22c..670cf20 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "name": "storefront-permissions", "vendor": "vtex", - "version": "1.44.7", + "version": "1.44.8", "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 4884491..325a9b7 100644 --- a/node/package.json +++ b/node/package.json @@ -1,6 +1,6 @@ { "name": "vtex.checkout-ui-custom", - "version": "1.44.7", + "version": "1.44.8", "dependencies": { "@vtex/api": "6.47.0", "atob": "^2.1.2",