From 2e60ba31375c563dfd2db43d55490142c1c4b653 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Mon, 13 Nov 2023 15:27:07 +0100 Subject: [PATCH] Export: fix infinite loop in HouseholdVoter --- .changes/unreleased/Fixed-20231113-152621.yaml | 5 +++++ .../Security/Authorization/HouseholdVoter.php | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changes/unreleased/Fixed-20231113-152621.yaml diff --git a/.changes/unreleased/Fixed-20231113-152621.yaml b/.changes/unreleased/Fixed-20231113-152621.yaml new file mode 100644 index 000000000..e897fec30 --- /dev/null +++ b/.changes/unreleased/Fixed-20231113-152621.yaml @@ -0,0 +1,5 @@ +kind: Fixed +body: 'Export: Fix failure in export linked to household' +time: 2023-11-13T15:26:21.891117274+01:00 +custom: + Issue: "189" diff --git a/src/Bundle/ChillPersonBundle/Security/Authorization/HouseholdVoter.php b/src/Bundle/ChillPersonBundle/Security/Authorization/HouseholdVoter.php index 798ed853a..415154457 100644 --- a/src/Bundle/ChillPersonBundle/Security/Authorization/HouseholdVoter.php +++ b/src/Bundle/ChillPersonBundle/Security/Authorization/HouseholdVoter.php @@ -78,7 +78,7 @@ class HouseholdVoter extends Voter implements ProvideRoleHierarchyInterface, Chi return match ($attribute) { self::SEE => $this->checkAssociatedMembersRole($subject, PersonVoter::SEE), self::EDIT => $this->checkAssociatedMembersRole($subject, PersonVoter::UPDATE), - self::STATS => $this->voteOnAttribute($attribute, $subject, $token), + self::STATS => $this->helper->voteOnAttribute($attribute, $subject, $token), default => throw new \UnexpectedValueException('attribute not supported'), }; }