mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 14:43:49 +00:00
cs-fixes
This commit is contained in:
@@ -12,9 +12,7 @@ declare(strict_types=1);
|
||||
namespace Chill\BudgetBundle\Security\Authorization;
|
||||
|
||||
use Chill\BudgetBundle\Entity\AbstractElement;
|
||||
use Chill\MainBundle\Entity\User;
|
||||
use Chill\MainBundle\Security\Authorization\AbstractChillVoter;
|
||||
use Chill\MainBundle\Security\Authorization\AuthorizationHelper;
|
||||
use Chill\MainBundle\Security\Authorization\VoterHelperFactoryInterface;
|
||||
use Chill\MainBundle\Security\Authorization\VoterHelperInterface;
|
||||
use Chill\MainBundle\Security\ProvideRoleHierarchyInterface;
|
||||
@@ -46,12 +44,11 @@ class BudgetElementVoter extends AbstractChillVoter implements ProvideRoleHierar
|
||||
public function __construct(VoterHelperFactoryInterface $voterFactory)
|
||||
{
|
||||
$this->voter = $voterFactory
|
||||
->generate(self::class)
|
||||
->addCheckFor(AbstractElement::class, self::ROLES)
|
||||
->addCheckFor(Person::class, [self::CREATE, self::SEE])
|
||||
->addCheckFor(Household::class, [self::CREATE, self::SEE])
|
||||
->build();
|
||||
|
||||
->generate(self::class)
|
||||
->addCheckFor(AbstractElement::class, self::ROLES)
|
||||
->addCheckFor(Person::class, [self::CREATE, self::SEE])
|
||||
->addCheckFor(Household::class, [self::CREATE, self::SEE])
|
||||
->build();
|
||||
}
|
||||
|
||||
public function getRoles(): array
|
||||
@@ -77,8 +74,6 @@ class BudgetElementVoter extends AbstractChillVoter implements ProvideRoleHierar
|
||||
|
||||
protected function voteOnAttribute($attribute, $subject, TokenInterface $token)
|
||||
{
|
||||
|
||||
return $this->voter->voteOnAttribute($attribute, $subject, $token);
|
||||
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user