From fdcbb01972bd21385d08be9c7bcbfccd1d1ba3ed Mon Sep 17 00:00:00 2001 From: Vikas Agarwal Date: Wed, 16 Jan 2019 14:59:07 +0530 Subject: [PATCH] fixing issue with acceptance of inviting members by handle --- 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 300ba0ad..16200c0a 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'; }