diff --git a/CHANGELOG.md b/CHANGELOG.md index 4cee64f7..4013b272 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [Unreleased] +### Fixed +- Check user email with toLowerCase + ## [2.171.0] - 2024-06-28 ### Fixed diff --git a/node/directives/withCurrentProfile.ts b/node/directives/withCurrentProfile.ts index 6a40cd74..b9ccc522 100644 --- a/node/directives/withCurrentProfile.ts +++ b/node/directives/withCurrentProfile.ts @@ -260,7 +260,8 @@ async function checkUserAccount( 'id' in tokenUser && !( tokenUser.account === account && - (isUserCallCenterOperator || tokenUser.user === currentProfile?.email) + (isUserCallCenterOperator || + tokenUser.user.toLowerCase() === currentProfile?.email.toLowerCase()) ) ) { throw new AuthenticationError('')