AuthorizationInterface.php 474 B

123456789101112131415161718192021222324
  1. <?php
  2. /**
  3. * Authorization interface
  4. *
  5. * Copyright © Magento, Inc. All rights reserved.
  6. * See COPYING.txt for license details.
  7. */
  8. namespace Magento\Framework;
  9. /**
  10. * @api
  11. * @since 100.0.2
  12. */
  13. interface AuthorizationInterface
  14. {
  15. /**
  16. * Check current user permission on resource and privilege
  17. *
  18. * @param string $resource
  19. * @param string $privilege
  20. * @return boolean
  21. */
  22. public function isAllowed($resource, $privilege = null);
  23. }