DefaultPolicy.php 608 B

1234567891011121314151617181920212223242526
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. /**
  7. * Default authorization policy. Allows access to all resources
  8. */
  9. namespace Magento\Framework\Authorization\Policy;
  10. class DefaultPolicy implements \Magento\Framework\Authorization\PolicyInterface
  11. {
  12. /**
  13. * Check whether given role has access to give id
  14. *
  15. * @param string $roleId
  16. * @param string $resourceId
  17. * @param string $privilege
  18. * @return true
  19. */
  20. public function isAllowed($roleId, $resourceId, $privilege = null)
  21. {
  22. return true;
  23. }
  24. }