Skip to content

Commit

Permalink
Merge branch 'master' into fix/login-error
Browse files Browse the repository at this point in the history
  • Loading branch information
enzomerca authored Oct 3, 2024
2 parents e0b6e28 + 3b54c00 commit 7414868
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 4 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion node/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
11 changes: 9 additions & 2 deletions node/resolvers/Routes/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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) => {
Expand Down

0 comments on commit 7414868

Please sign in to comment.