8000 merged branch yktd26/master (PR #1673) · symfony/symfony@af70ac8 · GitHub
[go: up one dir, main page]

Skip to content

Commit af70ac8

Browse files
committed
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
2 parents c881379 + 26ff05b commit af70ac8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Symfony/Component/Security/Acl/Domain/RoleSecurityIdentity.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
namespace Symfony\Component\Security\Acl\Domain;
1313

1414
use Symfony\Component\Security\Acl\Model\SecurityIdentityInterface;
15-
use Symfony\Component\Security\Core\Role\Role;
15+
use Symfony\Component\Security\Core\Role\RoleInterface;
1616

1717
/**
1818
* A SecurityIdentity implementation for roles
@@ -31,7 +31,7 @@ final class RoleSecurityIdentity implements SecurityIdentityInterface
3131
*/
3232
public function __construct($role)
3333
{
34-
if ($role instanceof Role) {
34+
if ($role instanceof RoleInterface) {
3535
$role = $role->getRole();
3636
}
3737

0 commit comments

Comments
 (0)
0