From 4f1e58a66ad31a5d1781367644d107c375403465 Mon Sep 17 00:00:00 2001 From: Tobias Werth Date: Tue, 2 Sep 2025 17:57:39 +0400 Subject: [PATCH] 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 a24340fb3c70687c14764409dd43988c06264b5d) --- webapp/src/Controller/API/SubmissionController.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/webapp/src/Controller/API/SubmissionController.php b/webapp/src/Controller/API/SubmissionController.php index 419c1b12df..569ab8697e 100644 --- a/webapp/src/Controller/API/SubmissionController.php +++ b/webapp/src/Controller/API/SubmissionController.php @@ -455,7 +455,8 @@ protected function getQueryBuilder(Request $request): QueryBuilder // If an ID has not been given directly, only show submissions before contest end. // This allows us to use eventlog on too-late submissions while not exposing them in the API directly. - if (!$request->attributes->has('id') && !$request->query->has('ids') && !$this->dj->checkrole('admin')) { + if (!$request->attributes->has('id') && !$request->query->has('ids') && + !($this->dj->checkrole('admin') || $this->dj->checkrole('judgehost'))) { $queryBuilder->andWhere('s.submittime < c.endtime'); }