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 = [
42
42
&& ! util . hasPermission ( PERMISSION . DELETE_REQUESTED_INVITE , req . authUser , req . context . currentProjectMembers )
43
43
) {
44
44
error = 'You don\'t have permissions to cancel requested invites.' ;
45
- } else if (
45
+ }
46
+
47
+ if (
46
48
invite . role !== PROJECT_MEMBER_ROLE . CUSTOMER
47
49
&& ! ownInvite
48
50
&& ! util . hasPermission ( PERMISSION . DELETE_NON_CUSTOMER_INVITE , req . authUser , req . context . currentProjectMembers )
49
51
) {
50
52
error = 'You don\'t have permissions to cancel invites to Topcoder Team for other users.' ;
51
- } else if (
53
+ }
54
+
55
+ if (
52
56
invite . role === PROJECT_MEMBER_ROLE . CUSTOMER
53
57
&& ! ownInvite
54
58
&& ! 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 = [
62
62
&& ! util . hasPermission ( PERMISSION . UPDATE_REQUESTED_INVITE , req . authUser , req . context . currentProjectMembers )
63
63
) {
64
64
error = 'You don\'t have permissions to update requested invites.' ;
65
- } else if (
65
+ }
66
+
67
+ if (
66
68
! ownInvite
67
69
&& ! util . hasPermission ( PERMISSION . UPDATE_NOT_OWN_INVITE , req . authUser , req . context . currentProjectMembers )
68
70
) {
You can’t perform that action at this time.
0 commit comments