fixed: ACL in activity creations and edition

This commit is contained in:
2022-07-11 18:24:48 +02:00
parent 93560a62ef
commit ce17c15d41
4 changed files with 18 additions and 13 deletions

View File

@@ -198,7 +198,7 @@ final class ActivityController extends AbstractController
// $this->denyAccessUnlessGranted('CHILL_ACTIVITY_UPDATE', $entity);
$form = $this->createForm(ActivityType::class, $entity, [
'center' => $entity->getCenter(),
'center' => $entity->getCenters()[0] ?? null,
'role' => new Role('CHILL_ACTIVITY_UPDATE'),
'activityType' => $entity->getActivityType(),
'accompanyingPeriod' => $accompanyingPeriod,