Skip to content

Commit 1980a1b

Browse files
iterative reviewer role
1 parent b3e2480 commit 1980a1b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/common/helper.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -459,6 +459,12 @@ function * checkCreateAccess (authUser, subEntity) {
459459
throw new errors.HttpStatusError(400, `You cannot create a submission for a challenge while you are a reviewer`)
460460
}
461461

462+
// Check if the User is assigned as the iterative reviewer for the contest
463+
const iterativeReviewers = _.filter(currUserRoles, { role: 'Iterative Reviewer' })
464+
if (iterativeReviewers.length !== 0) {
465+
throw new errors.HttpStatusError(400, `You cannot create a submission for a challenge while you are a iterative reviewer`)
466+
}
467+
462468
// Check if the User is registered for the contest
463469
const submitters = _.filter(currUserRoles, { role: 'Submitter' })
464470
if (submitters.length === 0) {

0 commit comments

Comments
 (0)