Skip to content

Commit 360aee6

Browse files
committed
Allow the judgehost role to access submissions past end of contest via the API.
This is already possible by requesting a specific submissions; this will make it more consistent. (cherry picked from commit a24340f)
1 parent 039a23f commit 360aee6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

webapp/src/Controller/API/SubmissionController.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,8 @@ protected function getQueryBuilder(Request $request): QueryBuilder
455455

456456
// If an ID has not been given directly, only show submissions before contest end.
457457
// This allows us to use eventlog on too-late submissions while not exposing them in the API directly.
458-
if (!$request->attributes->has('id') && !$request->query->has('ids') && !$this->dj->checkrole('admin')) {
458+
if (!$request->attributes->has('id') && !$request->query->has('ids') &&
459+
!($this->dj->checkrole('admin') || $this->dj->checkrole('judgehost'))) {
459460
$queryBuilder->andWhere('s.submittime < c.endtime');
460461
}
461462

0 commit comments

Comments
 (0)