mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2026-03-13 17:37:45 +00:00
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.
This commit is contained in:
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user