diff --git a/src/Bundle/ChillBudgetBundle/Security/Authorization/BudgetElementVoter.php b/src/Bundle/ChillBudgetBundle/Security/Authorization/BudgetElementVoter.php index d815cc147..a396f78ba 100644 --- a/src/Bundle/ChillBudgetBundle/Security/Authorization/BudgetElementVoter.php +++ b/src/Bundle/ChillBudgetBundle/Security/Authorization/BudgetElementVoter.php @@ -18,6 +18,7 @@ use Chill\MainBundle\Security\Authorization\AuthorizationHelper; use Chill\MainBundle\Security\Authorization\VoterHelperFactoryInterface; use Chill\MainBundle\Security\Authorization\VoterHelperInterface; use Chill\MainBundle\Security\ProvideRoleHierarchyInterface; +use Chill\PersonBundle\Entity\Household\Household; use Chill\PersonBundle\Entity\Person; use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; @@ -47,7 +48,8 @@ class BudgetElementVoter extends AbstractChillVoter implements ProvideRoleHierar $this->voter = $voterFactory ->generate(self::class) ->addCheckFor(AbstractElement::class, self::ROLES) - ->addCheckFor(null, [self::CREATE]) + ->addCheckFor(Person::class, [self::CREATE, self::SEE]) + ->addCheckFor(Household::class, [self::CREATE, self::SEE]) ->build(); }