mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
Voter adapted for use within vendee
This commit is contained in:
parent
0d96c1f12d
commit
ed33514aee
@ -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();
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user