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

Commit

Permalink
[#4226] Added test reproducing issue
Browse files Browse the repository at this point in the history
- calling `allow($role)` after a resource exists should grant that role
  all privileges on all resources.
  • Loading branch information
weierophinney committed Apr 15, 2013
1 parent 73f7ad2 commit 4ea782f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/ZendTest/Permissions/Acl/AclTest.php
Expand Up @@ -1372,4 +1372,12 @@ public function testSetRuleWorksWithResourceInterface()

$this->_acl->setRule(Acl\Acl::OP_ADD, Acl\Acl::TYPE_ALLOW, $roleGuest, $resourceFoo);
}

public function testAllowNullPermissionAfterResourcesExistShouldAllowAllPermissionsForRole()
{
$this->_acl->addRole('admin');
$this->_acl->addResource('newsletter');
$this->_acl->allow('admin');
$this->assertTrue($this->_acl->isAllowed('admin'));
}
}

0 comments on commit 4ea782f

Please sign in to comment.