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'), }; }