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('')