PolicyInterface.php 613 B

1234567891011121314151617181920212223242526
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Framework\Authorization;
  7. /**
  8. * Responsible for internal authorization decision making based on provided role, resource and privilege
  9. *
  10. * @api
  11. * @since 100.0.2
  12. */
  13. interface PolicyInterface
  14. {
  15. /**
  16. * Check whether given role has access to given resource
  17. *
  18. * @abstract
  19. * @param string $roleId
  20. * @param string $resourceId
  21. * @param string|null $privilege
  22. * @return bool
  23. */
  24. public function isAllowed($roleId, $resourceId, $privilege = null);
  25. }