@@ -74,7 +74,7 @@ public function __construct(
|
74 | 74 | * Add a new contest.
|
75 | 75 | * @throws BadRequestHttpException
|
76 | 76 | */
|
77 |
| -#[IsGranted('ROLE_API_CONTEST_CHANGE')] |
| 77 | +#[IsGranted('ROLE_API_CONTEST_EDITOR')] |
78 | 78 | #[Rest\Post('')]
|
79 | 79 | #[OA\RequestBody(
|
80 | 80 | required: true,
|
@@ -200,7 +200,7 @@ public function bannerAction(Request $request, string $cid): Response
|
200 | 200 | /**
|
201 | 201 | * Delete the banner for the given contest.
|
202 | 202 | */
|
203 |
| -#[IsGranted('ROLE_API_CONTEST_CHANGE')] |
| 203 | +#[IsGranted('ROLE_API_CONTEST_EDITOR')] |
204 | 204 | #[Rest\Delete('/{cid}/banner', name: 'delete_contest_banner')]
|
205 | 205 | #[OA\Response(response: 204, description: 'Deleting banner succeeded')]
|
206 | 206 | #[OA\Parameter(ref: '#/components/parameters/cid')]
|
@@ -220,7 +220,7 @@ public function deleteBannerAction(Request $request, string $cid): Response
|
220 | 220 | /**
|
221 | 221 | * Set the banner for the given contest.
|
222 | 222 | */
|
223 |
| -#[IsGranted('ROLE_API_CONTEST_CHANGE')] |
| 223 | +#[IsGranted('ROLE_API_CONTEST_EDITOR')] |
224 | 224 | #[Rest\Post("/{cid}/banner", name: 'post_contest_banner')]
|
225 | 225 | #[Rest\Put("/{cid}/banner", name: 'put_contest_banner')]
|
226 | 226 | #[OA\RequestBody(
|
@@ -268,7 +268,7 @@ public function setBannerAction(Request $request, string $cid, ValidatorInterfac
|
268 | 268 | /**
|
269 | 269 | * Delete the problemset document for the given contest.
|
270 | 270 | */
|
271 |
| -#[IsGranted('ROLE_API_CONTEST_CHANGE')] |
| 271 | +#[IsGranted('ROLE_API_CONTEST_EDITOR')] |
272 | 272 | #[Rest\Delete('/{cid}/problemset', name: 'delete_contest_problemset')]
|
273 | 273 | #[OA\Response(response: 204, description: 'Deleting problemset document succeeded')]
|
274 | 274 | #[OA\Parameter(ref: '#/components/parameters/cid')]
|
@@ -288,7 +288,7 @@ public function deleteProblemsetAction(Request $request, string $cid): Response
|
288 | 288 | /**
|
289 | 289 | * Set the problemset document for the given contest.
|
290 | 290 | */
|
291 |
| -#[IsGranted('ROLE_API_CONTEST_CHANGE')] |
| 291 | +#[IsGranted('ROLE_API_CONTEST_EDITOR')] |
292 | 292 | #[Rest\Post("/{cid}/problemset", name: 'post_contest_problemset')]
|
293 | 293 | #[Rest\Put("/{cid}/problemset", name: 'put_contest_problemset')]
|
294 | 294 | #[OA\RequestBody(
|
@@ -384,7 +384,7 @@ public function problemsetAction(Request $request, string $cid): Response
|
384 | 384 | * Change the start time or unfreeze (thaw) time of the given contest.
|
385 | 385 | * @throws NonUniqueResultException
|
386 | 386 | */
|
387 |
| -#[IsGranted(new Expression("is_granted('ROLE_API_WRITER') or is_granted('ROLE_API_CONTEST_CHANGE')"))] |
| 387 | +#[IsGranted(new Expression("is_granted('ROLE_API_WRITER') or is_granted('ROLE_API_CONTEST_EDITOR')"))] |
388 | 388 | #[Rest\('/{cid}')]
|
389 | 389 | #[OA\RequestBody(
|
390 | 390 | required: true,
|
|
0 commit comments