*/ class AdministrativeAccessVoter extends Voter { public const ADMINISTRATIVE_ACCESS = 'ADMINISTRATIVE_ACCESS'; public function __construct( private readonly AccessDecisionManagerInterface $accessDecisionManager, ) { } protected function supports(string $attribute, mixed $subject): bool { return self::ADMINISTRATIVE_ACCESS === $attribute; } protected function voteOnAttribute(string $attribute, mixed $subject, TokenInterface $token, ?Vote $vote = null): bool { return $this->accessDecisionManager->decide($token, ['ROLE_ADMIN']) || $this->accessDecisionManager->decide($token, ['ROLE_GROUPS_MANAGER']) || $this->accessDecisionManager->decide($token, ['ROLE_CUSTOMER_EXPERT']); } }