diff --git a/composer.json b/composer.json index 897f056..012e7a7 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,8 @@ { "name": "phphacks/zend-mvc-acl", "require": { - "zendframework/zend-mvc": "^3.1" + "zendframework/zend-mvc": "^3.1", + "zendframework/zend-mvc-console": "^1.1.10" }, "require-dev": { "phpunit/phpunit": "^7.2" diff --git a/src/Acl/Auth/Authorizator.php b/src/Acl/Auth/Authorizator.php index 4e84fce..4da14a6 100644 --- a/src/Acl/Auth/Authorizator.php +++ b/src/Acl/Auth/Authorizator.php @@ -50,6 +50,11 @@ public function __construct(array $config, ServiceLocatorInterface $serviceManag */ public function authorize(RequestInterface $request): bool { + if ($request instanceof \Zend\Console\Response) + { + return true; + } + if (in_array($request->getUri()->getPath(), $this->whitelist)) { return true; }