fixed: do not allow to edit a course through the "warning" button on the course's index page

This commit is contained in:
2022-07-11 13:45:52 +02:00
parent 87a9d48bdf
commit 16fed67dd0
3 changed files with 6 additions and 2 deletions

View File

@@ -177,7 +177,7 @@ class AccompanyingCourseController extends Controller
*/
public function editAction(AccompanyingPeriod $accompanyingCourse): Response
{
$this->denyAccessUnlessGranted(AccompanyingPeriodVoter::SEE, $accompanyingCourse);
$this->denyAccessUnlessGranted(AccompanyingPeriodVoter::EDIT, $accompanyingCourse);
return $this->render('@ChillPerson/AccompanyingCourse/edit.html.twig', [
'accompanyingCourse' => $accompanyingCourse,