From a9d7a00e6d7e8528361044a1d26361cc0a117a74 Mon Sep 17 00:00:00 2001 From: wagnerlduarte Date: Tue, 27 Aug 2024 17:45:58 -0300 Subject: [PATCH] check email --- node/directives/withCurrentProfile.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/node/directives/withCurrentProfile.ts b/node/directives/withCurrentProfile.ts index 7db2da36..b9ccc522 100644 --- a/node/directives/withCurrentProfile.ts +++ b/node/directives/withCurrentProfile.ts @@ -261,7 +261,7 @@ async function checkUserAccount( !( tokenUser.account === account && (isUserCallCenterOperator || - tokenUser.id.toLowerCase() === currentProfile?.userId.toLowerCase()) + tokenUser.user.toLowerCase() === currentProfile?.email.toLowerCase()) ) ) { throw new AuthenticationError('')