Skip to content
Browse files

[#4226] Added test reproducing issue

- calling `allow($role)` after a resource exists should grant that role
  all privileges on all resources.
  • Loading branch information...
1 parent 73f7ad2 commit 4ea782fa9eb233c9fe28177f30bc42eef104f6e1 @weierophinney weierophinney committed Apr 15, 2013
Showing with 8 additions and 0 deletions.
  1. +8 −0 tests/ZendTest/Permissions/Acl/AclTest.php
View
8 tests/ZendTest/Permissions/Acl/AclTest.php
@@ -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.
Something went wrong with that request. Please try again.