<?php
declare(strict_types=1);
/**
* TransactionVoter.php File.
* This file is part of the Payment.net Project.
*
* PHP version 5
*
* @category Application
* @package Bdm\BackofficeBundle\Security\Authorization\Voter
* @author Pavel Baraulya <pbaraulya@bdmultimedia.fr>
* @link http://www.payment.net/
*
* FEATURES :
* ==========
*
* TODO-LIST :
* ===========
*
* HISTORY :
* =========
* 20150709 - Pavel Baraulya
*
**/
namespace Bdm\BackofficeBundle\Security\Authorization\Voter;
use Bdm\BackofficeBundle\Entity\Merchant;
use Symfony\Component\Security\Core\Authorization\Voter\RoleVoter;
/**
* Voter for transaction entity
*/
class ValidUserVoter extends RoleVoter
{
public function __construct()
{
parent::__construct('VALID');
}
#[\Override]
public function supportsAttribute(string $attribute): bool
{
return $attribute === Merchant::VALID_USER;
}
}