Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion webapp/src/Controller/API/SubmissionController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'))) {
Comment on lines +458 to +459
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the ! can be extracted further which makes it easier to read. And maybe admin should get the judgehost role implicit?

$queryBuilder->andWhere('s.submittime < c.endtime');
}

Expand Down
Loading