Skip to content
This repository has been archived by the owner on Jan 30, 2020. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Maks3w committed Mar 14, 2014
2 parents 9c10c4b + 92aaaab commit 5e876f2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Rbac.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ public function getRole($objectOrName)

$it = new RecursiveIteratorIterator($this, RecursiveIteratorIterator::CHILD_FIRST);
foreach ($it as $leaf) {
/* @var RoleInterface $leaf */
if ((is_string($objectOrName) && $leaf->getName() == $objectOrName) || $leaf == $objectOrName) {
return $leaf;
}
Expand All @@ -127,6 +128,7 @@ public function getRole($objectOrName)
* @param RoleInterface|string $role
* @param string $permission
* @param AssertionInterface|Callable|null $assert
* @throws Exception\InvalidArgumentException
* @return bool
*/
public function isGranted($role, $permission, $assert = null)
Expand Down

0 comments on commit 5e876f2

Please sign in to comment.