We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8342cf2 commit c8c97ecCopy full SHA for c8c97ec
webapp/src/Controller/API/ClarificationController.php
@@ -309,6 +309,14 @@ protected function getQueryBuilder(Request $request): QueryBuilder
309
}
310
311
312
+ // For non-API-reader users, only expose the problems after the contest has started.
313
+ // `WF Access Policy` allows for clarifications before the contest, but not to disclose the problem
314
+ // so referencing them in clarifications would violate referential integrity.
315
+ if (!$this->dj->checkrole('api_reader')) {
316
+ $queryBuilder->andWhere('c.starttime < :now OR clar.problem IS NULL')
317
+ ->setParameter('now', Utils::now());
318
+ }
319
+
320
if ($request->query->has('problem')) {
321
$queryBuilder
322
->andWhere('clar.problem = :problem')
0 commit comments