From 98b4f9785a0dfaf5c4898c63c1e1f2e7c37a49da Mon Sep 17 00:00:00 2001 From: Maiara Date: Thu, 7 Feb 2019 15:40:53 -0200 Subject: [PATCH] =?UTF-8?q?Corre=C3=A7=C3=A3o=20para=20aceitar=20rota=20de?= =?UTF-8?q?=20console=20OV-811?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- composer.json | 3 ++- src/Acl/Auth/Authorizator.php | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) 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; }