summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFabien Potencier <fabien.potencier@gmail.com>2011-07-13 11:30:35 +0200
committerFabien Potencier <fabien.potencier@gmail.com>2011-07-13 11:30:35 +0200
commit608c2c6c49cebc114bb080fc9a373add53482900 (patch)
treeeff12b6fbf4a56c2d06dd7c38455933e826f941b
parente92d9dbcde69ce8b78dc3a5924390b15c80a1e2b (diff)
parentbf467f101fdde411d87826af51f9229ec394a3d4 (diff)
downloadsymfony-security-608c2c6c49cebc114bb080fc9a373add53482900.zip
symfony-security-608c2c6c49cebc114bb080fc9a373add53482900.tar.gz
symfony-security-608c2c6c49cebc114bb080fc9a373add53482900.tar.bz2
merged branch yktd26/master (PR #1673)
Commits ------- 26ff05b fixes #1538 Discussion ---------- fixes #1538 Constructor of Symfony\Component\Security\Acl\Domain\RoleSecurityIdentity -------------------------------------------------------------------------------------------------------- currently it check if the argument is instance of Symfony\Component\Security\Core\Role\Role by ``if ($role instanceof Role)`` Maybe it should be changed to ``if ($role instanceof RoleInterface)`` Because if we use another Role class which implements RoleInterface it dosen't work when we check access, it will throw a *NoAceFoundException* when vote
-rw-r--r--Acl/Domain/RoleSecurityIdentity.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/Acl/Domain/RoleSecurityIdentity.php b/Acl/Domain/RoleSecurityIdentity.php
index 51d3d0c..13badff 100644
--- a/Acl/Domain/RoleSecurityIdentity.php
+++ b/Acl/Domain/RoleSecurityIdentity.php
@@ -12,7 +12,7 @@
namespace Symfony\Component\Security\Acl\Domain;
use Symfony\Component\Security\Acl\Model\SecurityIdentityInterface;
-use Symfony\Component\Security\Core\Role\Role;
+use Symfony\Component\Security\Core\Role\RoleInterface;
/**
* A SecurityIdentity implementation for roles
@@ -31,7 +31,7 @@ final class RoleSecurityIdentity implements SecurityIdentityInterface
*/
public function __construct($role)
{
- if ($role instanceof Role) {
+ if ($role instanceof RoleInterface) {
$role = $role->getRole();
}