PermissionGrantingStrategyInterface.php 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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 Boolean $administrativeMode
  25. * @return Boolean
  26. */
  27. public function isGranted(AclInterface $acl, array $masks, array $sids, $administrativeMode = false);
  28. /**
  29. * Determines whether access to a domain object's field is to be granted
  30. *
  31. * @param AclInterface $acl
  32. * @param string $field
  33. * @param array $masks
  34. * @param array $sids
  35. * @param Boolean $administrativeMode
  36. *
  37. * @return Boolean
  38. */
  39. public function isFieldGranted(AclInterface $acl, $field, array $masks, array $sids, $administrativeMode = false);
  40. }