mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 07:03:49 +00:00
apply new role on accompanying period
This commit is contained in:
@@ -73,7 +73,7 @@ class AccompanyingCourseController extends Controller
|
||||
}
|
||||
}
|
||||
|
||||
$this->denyAccessUnlessGranted(AccompanyingPeriodVoter::SEE, $period);
|
||||
$this->denyAccessUnlessGranted(AccompanyingPeriodVoter::CREATE, $period);
|
||||
|
||||
$em->persist($period);
|
||||
$em->flush();
|
||||
@@ -92,6 +92,8 @@ class AccompanyingCourseController extends Controller
|
||||
*/
|
||||
public function indexAction(AccompanyingPeriod $accompanyingCourse): Response
|
||||
{
|
||||
$this->denyAccessUnlessGranted(AccompanyingPeriodVoter::SEE, $accompanyingCourse);
|
||||
|
||||
// compute some warnings
|
||||
// get persons without household
|
||||
$withoutHousehold = [];
|
||||
@@ -131,6 +133,8 @@ class AccompanyingCourseController extends Controller
|
||||
*/
|
||||
public function editAction(AccompanyingPeriod $accompanyingCourse): Response
|
||||
{
|
||||
$this->denyAccessUnlessGranted(AccompanyingPeriodVoter::SEE, $accompanyingCourse);
|
||||
|
||||
return $this->render('@ChillPerson/AccompanyingCourse/edit.html.twig', [
|
||||
'accompanyingCourse' => $accompanyingCourse
|
||||
]);
|
||||
@@ -146,6 +150,8 @@ class AccompanyingCourseController extends Controller
|
||||
*/
|
||||
public function historyAction(AccompanyingPeriod $accompanyingCourse): Response
|
||||
{
|
||||
$this->denyAccessUnlessGranted(AccompanyingPeriodVoter::SEE, $accompanyingCourse);
|
||||
|
||||
return $this->render('@ChillPerson/AccompanyingCourse/history.html.twig', [
|
||||
'accompanyingCourse' => $accompanyingCourse
|
||||
]);
|
||||
|
Reference in New Issue
Block a user