Skip to content

Commit

Permalink
Merge pull request #2 from phphacks/OV-811
Browse files Browse the repository at this point in the history
Correção para aceitar rota de console
v1.0.4
  • Loading branch information
mgarcia88 authored Feb 7, 2019
2 parents 9c2bf87 + 98b4f97 commit 67e7dd7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
5 changes: 5 additions & 0 deletions src/Acl/Auth/Authorizator.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 67e7dd7

Please sign in to comment.