File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed
src/routes/projectMemberInvites Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -42,13 +42,17 @@ module.exports = [
4242 && ! util . hasPermission ( PERMISSION . DELETE_REQUESTED_INVITE , req . authUser , req . context . currentProjectMembers )
4343 ) {
4444 error = 'You don\'t have permissions to cancel requested invites.' ;
45- } else if (
45+ }
46+
47+ if (
4648 invite . role !== PROJECT_MEMBER_ROLE . CUSTOMER
4749 && ! ownInvite
4850 && ! util . hasPermission ( PERMISSION . DELETE_NON_CUSTOMER_INVITE , req . authUser , req . context . currentProjectMembers )
4951 ) {
5052 error = 'You don\'t have permissions to cancel invites to Topcoder Team for other users.' ;
51- } else if (
53+ }
54+
55+ if (
5256 invite . role === PROJECT_MEMBER_ROLE . CUSTOMER
5357 && ! ownInvite
5458 && ! util . hasPermission ( PERMISSION . DELETE_CUSTOMER_INVITE , req . authUser , req . context . currentProjectMembers )
Original file line number Diff line number Diff line change @@ -62,7 +62,9 @@ module.exports = [
6262 && ! util . hasPermission ( PERMISSION . UPDATE_REQUESTED_INVITE , req . authUser , req . context . currentProjectMembers )
6363 ) {
6464 error = 'You don\'t have permissions to update requested invites.' ;
65- } else if (
65+ }
66+
67+ if (
6668 ! ownInvite
6769 && ! util . hasPermission ( PERMISSION . UPDATE_NOT_OWN_INVITE , req . authUser , req . context . currentProjectMembers )
6870 ) {
You can’t perform that action at this time.
0 commit comments