From a4f47ad58bef3adc26825bacaa9c42339bbeb9f9 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Mon, 13 Feb 2023 19:10:15 +0100 Subject: [PATCH] FIX [parcours][create] only allow creation of parcours from within household context if user has the create parcours right --- .../views/Household/accompanying_period.html.twig | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/Bundle/ChillPersonBundle/Resources/views/Household/accompanying_period.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/Household/accompanying_period.html.twig index acd251735..efad5e2f0 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/Household/accompanying_period.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/Household/accompanying_period.html.twig @@ -40,13 +40,14 @@ {{ 'Household summary'|trans }} - {# TODO: add ACL to check if user is allowed to edit household? #} -
  • - - {{ 'Create an accompanying period'|trans }} - -
  • + {% if is_granted('CHILL_PERSON_ACCOMPANYING_PERIOD_CREATE') %} +
  • + + {{ 'Create an accompanying period'|trans }} + +
  • + {% endif %}