Skip to content

Commit 01fabde

Browse files
committed
fix update role permission
1 parent 0d29c21 commit 01fabde

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/routes/projectMemberInvites/update.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ module.exports = [
6666
if (!util.hasRoles(req, MANAGER_ROLES) && invite.role !== PROJECT_MEMBER_ROLE.CUSTOMER) {
6767
error = `Project members can cancel invites only for ${PROJECT_MEMBER_ROLE.CUSTOMER}`;
6868
}
69-
} else if (!!putInvite.userId && putInvite.userId !== req.authUser.userId) {
69+
} else if ((!!putInvite.userId && putInvite.userId !== req.authUser.userId) ||
70+
(!!putInvite.email && putInvite.email !== req.authUser.email)) {
7071
error = 'Project members can only update invites for themselves';
7172
}
7273

0 commit comments

Comments
 (0)