Skip to content

Commit 98b4f97

Browse files
author
Maiara
committed
Correção para aceitar rota de console
OV-811
1 parent decd134 commit 98b4f97

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{
22
"name": "phphacks/zend-mvc-acl",
33
"require": {
4-
"zendframework/zend-mvc": "^3.1"
4+
"zendframework/zend-mvc": "^3.1",
5+
"zendframework/zend-mvc-console": "^1.1.10"
56
},
67
"require-dev": {
78
"phpunit/phpunit": "^7.2"

src/Acl/Auth/Authorizator.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,11 @@ public function __construct(array $config, ServiceLocatorInterface $serviceManag
5050
*/
5151
public function authorize(RequestInterface $request): bool
5252
{
53+
if ($request instanceof \Zend\Console\Response)
54+
{
55+
return true;
56+
}
57+
5358
if (in_array($request->getUri()->getPath(), $this->whitelist)) {
5459
return true;
5560
}

0 commit comments

Comments
 (0)