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 7a7c73a commit 1c088e8Copy full SHA for 1c088e8
webapp/src/Controller/API/ClarificationController.php
@@ -297,6 +297,14 @@ protected function getQueryBuilder(Request $request): QueryBuilder
297
}
298
299
300
+ // For non-API-reader users, only expose the problems after the contest has started.
301
+ // `WF Access Policy` allows for clarifications before the contest, but not to disclose the problem
302
+ // so referencing them in clarifications would violate referential integrity.
303
+ if (!$this->dj->checkrole('api_reader')) {
304
+ $queryBuilder->andWhere('c.starttime < :now OR clar.problem IS NULL')
305
+ ->setParameter('now', Utils::now());
306
+ }
307
+
308
if ($request->query->has('problem')) {
309
$queryBuilder
310
->andWhere('clar.problem = :problem')
0 commit comments