bundles/BackofficeBundle/Security/Authorization/Voter/ValidUserVoter.php line 35

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * TransactionVoter.php File.
  5. * This file is part of the Payment.net Project.
  6. *
  7. * PHP version 5
  8. *
  9. * @category Application
  10. * @package Bdm\BackofficeBundle\Security\Authorization\Voter
  11. * @author Pavel Baraulya <pbaraulya@bdmultimedia.fr>
  12. * @link http://www.payment.net/
  13. *
  14. * FEATURES :
  15. * ==========
  16. *
  17. * TODO-LIST :
  18. * ===========
  19. *
  20. * HISTORY :
  21. * =========
  22. * 20150709 - Pavel Baraulya
  23. *
  24. **/
  25. namespace Bdm\BackofficeBundle\Security\Authorization\Voter;
  26. use Bdm\BackofficeBundle\Entity\Merchant;
  27. use Symfony\Component\Security\Core\Authorization\Voter\RoleVoter;
  28. /**
  29. * Voter for transaction entity
  30. */
  31. class ValidUserVoter extends RoleVoter
  32. {
  33. public function __construct()
  34. {
  35. parent::__construct('VALID');
  36. }
  37. #[\Override]
  38. public function supportsAttribute(string $attribute): bool
  39. {
  40. return $attribute === Merchant::VALID_USER;
  41. }
  42. }