diff --git a/CHANGELOG.md b/CHANGELOG.md index 80eb4fd1e..8805ed944 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,8 @@ and this project adheres to * Use the user.label in accompanying course banner, instead of username; * fix: show validation message when closing accompanying course; * [thirdparty] link from modal to thirdparty detail page fixed (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/228) +* [activity] remove the "plus" button in activity list +* [activity] check ACL on activity list in person context ## Test releases diff --git a/src/Bundle/ChillActivityBundle/Resources/views/Activity/list.html.twig b/src/Bundle/ChillActivityBundle/Resources/views/Activity/list.html.twig index fef381527..7c75f5bf0 100644 --- a/src/Bundle/ChillActivityBundle/Resources/views/Activity/list.html.twig +++ b/src/Bundle/ChillActivityBundle/Resources/views/Activity/list.html.twig @@ -3,7 +3,6 @@ {% if activities|length == 0 %}
{% else %} diff --git a/src/Bundle/ChillActivityBundle/Resources/views/Activity/listPerson.html.twig b/src/Bundle/ChillActivityBundle/Resources/views/Activity/listPerson.html.twig index 830fecfb9..158bd0e1b 100644 --- a/src/Bundle/ChillActivityBundle/Resources/views/Activity/listPerson.html.twig +++ b/src/Bundle/ChillActivityBundle/Resources/views/Activity/listPerson.html.twig @@ -36,12 +36,14 @@ {% include 'ChillActivityBundle:Activity:list.html.twig' with {'context': 'person'} %} + {% if is_granted('CHILL_ACTIVITY_CREATE', person) %} + {% endif %} {% endblock %} diff --git a/src/Bundle/ChillPersonBundle/Tests/Validator/Person/PersonHasCenterValidatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Validator/Person/PersonHasCenterValidatorTest.php index 5c101740e..6603ca795 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Validator/Person/PersonHasCenterValidatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Validator/Person/PersonHasCenterValidatorTest.php @@ -54,6 +54,7 @@ class PersonHasCenterValidatorTest extends ConstraintValidatorTestCase ]); $prophecy = $this->prophesize(CenterResolverManagerInterface::class); + $prophecy->resolveCenters(Argument::type(Person::class), Argument::any())->will(function ($args) { $center = $args[0]->getCenter();