From ecf05992d8d81253444397138c31ba945eab6a11 Mon Sep 17 00:00:00 2001 From: Vikas Agarwal Date: Wed, 16 Jan 2019 15:33:02 +0530 Subject: [PATCH] Reverted change as it is a wrong fix --- src/routes/projectMemberInvites/update.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/projectMemberInvites/update.js b/src/routes/projectMemberInvites/update.js index 16200c0a..300ba0ad 100644 --- a/src/routes/projectMemberInvites/update.js +++ b/src/routes/projectMemberInvites/update.js @@ -66,7 +66,7 @@ module.exports = [ if (!util.hasRoles(req, MANAGER_ROLES) && invite.role !== PROJECT_MEMBER_ROLE.CUSTOMER) { error = `Project members can cancel invites only for ${PROJECT_MEMBER_ROLE.CUSTOMER}`; } - } else if ((!!putInvite.userId && `${putInvite.userId}` !== req.authUser.userId) || + } else if ((!!putInvite.userId && putInvite.userId !== req.authUser.userId) || (!!putInvite.email && putInvite.email !== req.authUser.email)) { error = 'Project members can only update invites for themselves'; }