From bb96b9312e9096b6997ce00fa4c27b3b946c55b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Wed, 28 Jan 2026 16:20:01 +0100 Subject: [PATCH] Replace `PrivacyEvent` dispatch with `AuditEvent` for viewing a person. - Updated `PersonController` to dispatch `AuditEvent` with `AUDIT_VIEW` action instead of `PrivacyEvent`. - Added necessary `AuditEvent` and `AuditTrail` imports to the controller. --- src/Bundle/ChillPersonBundle/Controller/PersonController.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Bundle/ChillPersonBundle/Controller/PersonController.php b/src/Bundle/ChillPersonBundle/Controller/PersonController.php index 4698373f1..97d568f58 100644 --- a/src/Bundle/ChillPersonBundle/Controller/PersonController.php +++ b/src/Bundle/ChillPersonBundle/Controller/PersonController.php @@ -11,6 +11,8 @@ declare(strict_types=1); namespace Chill\PersonBundle\Controller; +use Chill\MainBundle\Audit\AuditEvent; +use Chill\MainBundle\Entity\AuditTrail; use Chill\MainBundle\Security\Authorization\AuthorizationHelperInterface; use Chill\PersonBundle\Config\ConfigPersonAltNamesHelper; use Chill\PersonBundle\Entity\Household\Household; @@ -204,8 +206,7 @@ final class PersonController extends AbstractController 'You are not allowed to see this person.' ); - $event = new PrivacyEvent($person); - $this->eventDispatcher->dispatch($event, PrivacyEvent::PERSON_PRIVACY_EVENT); + $this->eventDispatcher->dispatch(new AuditEvent(AuditTrail::AUDIT_VIEW, [$person])); return $this->render( '@ChillPerson/Person/view.html.twig',