From e11c249131e934f6dbd9c7430f5b72263b340c52 Mon Sep 17 00:00:00 2001 From: Pol Dellaiera Date: Tue, 30 Nov 2021 10:09:17 +0100 Subject: [PATCH] Fix constant name. --- .../Controller/AccompanyingCourseApiController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseApiController.php b/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseApiController.php index 35fb8d64b..e5e8140ad 100644 --- a/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseApiController.php +++ b/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseApiController.php @@ -256,7 +256,7 @@ final class AccompanyingCourseApiController extends ApiController public function toggleConfidentialApi(AccompanyingPeriod $accompanyingCourse, Request $request) { if ($request->getMethod() === 'POST') { - $this->denyAccessUnlessGranted(AccompanyingPeriodVoter::CONFIDENTIAL, $accompanyingCourse); + $this->denyAccessUnlessGranted(AccompanyingPeriodVoter::TOGGLE_CONFIDENTIAL, $accompanyingCourse); $accompanyingCourse->setConfidential(!$accompanyingCourse->isConfidential()); $this->getDoctrine()->getManager()->flush();