Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

check user email with toLowerCase #666

Merged
merged 3 commits into from
Sep 3, 2024
Merged

Conversation

wagnerlduarte
Copy link
Contributor

What problem is this solving?

Check user email with toLowerCase to prevent error when the identity user has difference from token

https://vtex-dev.atlassian.net/browse/OMS-6340

How to test it?

https://profile--dunnesstorespreprod.myvtex.com/account#/profile
User: [email protected]
Password: Dunnes123

Workspace

@wagnerlduarte wagnerlduarte self-assigned this Aug 23, 2024
@wagnerlduarte wagnerlduarte requested a review from a team as a code owner August 23, 2024 19:59
@wagnerlduarte wagnerlduarte requested review from gabpaladino, hellofanny and emersonlaurentino and removed request for a team August 23, 2024 20:00
Copy link
Contributor

vtex-io-ci-cd bot commented Aug 23, 2024

Hi! I'm VTEX IO CI/CD Bot and I'll be helping you to publish your app! 🤖

Please select which version do you want to release:

  • Patch (backwards-compatible bug fixes)

  • Minor (backwards-compatible functionality)

  • Major (incompatible API changes)

And then you just need to merge your PR when you are ready! There is no need to create a release commit/tag.

  • No thanks, I would rather do it manually 😞

@@ -260,7 +260,8 @@ async function checkUserAccount(
'id' in tokenUser &&
!(
tokenUser.account === account &&
(isUserCallCenterOperator || tokenUser.user === currentProfile?.email)
(isUserCallCenterOperator ||
tokenUser.id.toLowerCase() === currentProfile?.userId.toLowerCase())
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

não vale a pena usar o email nesse primeiro momento? e depois a gente ver com os logs se o match do id vai ser sempre certo

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lucas, muito bem observado, não havia me dado conta.
Fiz a alteração para seguirmos validando por email. ✅

Copy link
Contributor

@vmourac-vtex vmourac-vtex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@wagnerlduarte wagnerlduarte merged commit 3d04b45 into master Sep 3, 2024
4 of 5 checks passed
@wagnerlduarte wagnerlduarte deleted the hotfix/OMS-6340-check-email branch September 3, 2024 17:47
Copy link
Contributor

vtex-io-ci-cd bot commented Sep 3, 2024

Your PR has been merged! App is being published. 🚀
Version 2.171.0 → 2.171.1

After the publishing process has been completed (check #vtex-io-releases) and doing A/B tests with the new version, you can deploy your release by running:

vtex deploy [email protected]

After that your app will be updated on all accounts.

For more information on the deployment process check the docs. 📖

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants