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

Commit

Permalink
Merge branch 'master' into hotfix/translator-caching
Browse files Browse the repository at this point in the history
  • Loading branch information
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/Acl.php
Original file line number Diff line number Diff line change
Expand Up @@ -839,7 +839,7 @@ protected function roleDFSVisitAllPrivileges(Role\RoleInterface $role, Resource\
}

$dfs['visited'][$role->getRoleId()] = true;
foreach ($this->getRoleRegistry()->getParents($role) as $roleParentId => $roleParent) {
foreach ($this->getRoleRegistry()->getParents($role) as $roleParent) {
$dfs['stack'][] = $roleParent;
}

Expand Down Expand Up @@ -925,7 +925,7 @@ protected function roleDFSVisitOnePrivilege(Role\RoleInterface $role, Resource\R
}

$dfs['visited'][$role->getRoleId()] = true;
foreach ($this->getRoleRegistry()->getParents($role) as $roleParentId => $roleParent) {
foreach ($this->getRoleRegistry()->getParents($role) as $roleParent) {
$dfs['stack'][] = $roleParent;
}

Expand Down
8 changes: 4 additions & 4 deletions test/AclTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -1210,8 +1210,8 @@ public function testAclPassesPrivilegeToAssertClass()
$acl = new Acl\Acl();
$acl->addRole('role');
$acl->addResource('resource');
$acl->allow('role',null,null,$assertion);
$allowed = $acl->isAllowed('role','resource','privilege',$assertion);
$acl->allow('role', null, null, $assertion);
$allowed = $acl->isAllowed('role','resource','privilege', $assertion);

$this->assertTrue($allowed);
}
Expand All @@ -1221,7 +1221,7 @@ public function testAclPassesPrivilegeToAssertClass()
*/
public function testgetRoles()
{
$this->assertEquals(array(),$this->_acl->getRoles());
$this->assertEquals(array(), $this->_acl->getRoles());

$roleGuest = new Role\GenericRole('guest');
$this->_acl->addRole($roleGuest);
Expand All @@ -1238,7 +1238,7 @@ public function testgetRoles()
*/
public function testgetResources()
{
$this->assertEquals(array(),$this->_acl->getResources());
$this->assertEquals(array(), $this->_acl->getResources());

$this->_acl->addResource(new Resource\GenericResource('someResource'));
$this->_acl->addResource(new Resource\GenericResource('someOtherResource'));
Expand Down

0 comments on commit 81b48da

Please sign in to comment.