PermissionGrantingStrategyInterface.php 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?php
  2. /*
  3. * This file is part of the Symfony package.
  4. *
  5. * (c) Fabien Potencier <fabien@symfony.com>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace Symfony\Component\Security\Acl\Model;
  11. /**
  12. * Interface used by permission granting implementations.
  13. *
  14. * @author Johannes M. Schmitt <schmittjoh@gmail.com>
  15. */
  16. interface PermissionGrantingStrategyInterface
  17. {
  18. /**
  19. * Determines whether access to a domain object is to be granted.
  20. *
  21. * @param AclInterface $acl
  22. * @param array $masks
  23. * @param array $sids
  24. * @param bool $administrativeMode
  25. *
  26. * @return bool
  27. */
  28. public function isGranted(AclInterface $acl, array $masks, array $sids, $administrativeMode = false);
  29. /**
  30. * Determines whether access to a domain object's field is to be granted.
  31. *
  32. * @param AclInterface $acl
  33. * @param string $field
  34. * @param array $masks
  35. * @param array $sids
  36. * @param bool $administrativeMode
  37. *
  38. * @return bool
  39. */
  40. public function isFieldGranted(AclInterface $acl, $field, array $masks, array $sids, $administrativeMode = false);
  41. }