mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 14:43:49 +00:00
Fix budget voter for use with household
This commit is contained in:
@@ -69,7 +69,7 @@ class BudgetElementVoter extends AbstractChillVoter implements ProvideRoleHierar
|
||||
protected function supports($attribute, $subject)
|
||||
{
|
||||
return (in_array($attribute, self::ROLES, true) && $subject instanceof AbstractElement)
|
||||
|| ($subject instanceof Person && in_array($attribute, [self::SEE, self::CREATE], true));
|
||||
|| (($subject instanceof Person || $subject instanceof Household) && in_array($attribute, [self::SEE, self::CREATE], true));
|
||||
}
|
||||
|
||||
protected function voteOnAttribute($attribute, $subject, TokenInterface $token)
|
||||
|
Reference in New Issue
Block a user