File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ workflows:
67
67
context : org-global
68
68
filters :
69
69
branches :
70
- only : ['develop ']
70
+ only : ['issue_reviewer_role ']
71
71
- " build-prod " :
72
72
context : org-global
73
73
filters :
Original file line number Diff line number Diff line change @@ -453,6 +453,12 @@ function * checkCreateAccess (authUser, subEntity) {
453
453
// Get phases and winner detail from challengeDetails
454
454
const phases = challengeDetails . body . phases
455
455
456
+ // Check if the User is assigned as the reviewer for the contest
457
+ const reviewers = _ . filter ( currUserRoles , { role : 'Reviewer' } )
458
+ if ( reviewers . length !== 0 ) {
459
+ throw new errors . HttpStatusError ( 400 , `You cannot create a submission for a challenge while you are a reviewer` )
460
+ }
461
+
456
462
// Check if the User is registered for the contest
457
463
const submitters = _ . filter ( currUserRoles , { role : 'Submitter' } )
458
464
if ( submitters . length === 0 ) {
You can’t perform that action at this time.
0 commit comments