8000 [Component] [Security] [Acl] [Domain] Role security identity fix by henneboele · Pull Request #7791 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[Component] [Security] [Acl] [Domain] Role security identity fix #7791

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Role security identity fix
The role security identity was only working when using the origin Role class. The construct method is changed to enable support for custom role entities.
  • Loading branch information
henneboele committed Jun 19, 2013
commit 427b54b717a9f04c0e9bbeb69ef509ebd182c062
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -30,11 +30,11 @@ final class RoleSecurityIdentity implements SecurityIdentityInterface
*/
public function __construct($role)
{
if ($role instanceof Role) {
if ($role instanceof RoleInterface) {
$role = $role->getRole();
}

$this->role = (string) $role;
$this->role = $role;
}

/**
Expand Down
0