This commit is contained in:
2022-10-05 15:23:28 +02:00
parent 58b1778544
commit a967e1ed17
194 changed files with 1580 additions and 1386 deletions

View File

@@ -53,16 +53,16 @@ class HouseholdVoter extends Voter implements ProvideRoleHierarchyInterface
->build();
}
public function getRolesWithHierarchy(): array
{
return [ 'Person' => $this->getRoles() ];
}
public function getRoles(): array
{
return [self::STATS];
}
public function getRolesWithHierarchy(): array
{
return ['Person' => $this->getRoles()];
}
public function getRolesWithoutScope(): array
{
return $this->getRoles();
@@ -72,8 +72,7 @@ class HouseholdVoter extends Voter implements ProvideRoleHierarchyInterface
{
return ($subject instanceof Household
&& in_array($attribute, self::ALL, true))
|| $this->helper->supports($attribute, $subject)
;
|| $this->helper->supports($attribute, $subject);
}
protected function voteOnAttribute($attribute, $subject, TokenInterface $token): bool