AuthorizationMock.php 624 B

123456789101112131415161718192021222324252627
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. declare(strict_types=1);
  7. namespace Magento\Ui\Model;
  8. /**
  9. * Class AuthorizationMock
  10. */
  11. class AuthorizationMock extends \Magento\Framework\Authorization
  12. {
  13. /**
  14. * Check current user permission on resource and privilege
  15. *
  16. * @param string $resource
  17. * @param string $privilege
  18. * @return boolean
  19. * @SuppressWarnings(PHPMD.UnusedFormalParameter)
  20. */
  21. public function isAllowed($resource, $privilege = null)
  22. {
  23. return $resource !== 'Magento_Customer::manage';
  24. }
  25. }