mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 14:43:49 +00:00
Voter adapted for use within vendee
This commit is contained in:
@@ -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();
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user