Skip to content

Commit

Permalink
Final Hotfix
Browse files Browse the repository at this point in the history
  • Loading branch information
geggleto committed Jan 8, 2016
1 parent 250e8d4 commit ae5d423
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/AclRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,11 @@ public function __construct(array $role, array $config = [])
}

$this->handler = function (ServerRequestInterface $requestInterface, AclRepository $aclRepo) {
$this->

$route = $requestInterface->getAttribute('route');
var_dump($route);
var_dump($requestInterface->getAttributes());

if (!empty($route)) {
foreach ($aclRepo->getRole() as $role) {
if ($aclRepo->isAllowed($role, $route->getPattern())) {
Expand All @@ -105,7 +108,6 @@ public function __construct(array $role, array $config = [])
}
return false;
};
$this->handler->bindTo($this);

}

Expand Down

0 comments on commit ae5d423

Please sign in to comment.