Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitdd04a2e

Browse files
committed
Fix custom Roles in entity_provider cookbook.
The documentation seems to assume the implementation present in commitsymfony/symfony#1673, which reverted soon after dueto a potential, but undisclosed security hole (citation@schmittjoh insymfony/symfony@af70ac8).This incorrect documentation has likely been the source of manyof the following issues:*symfony/symfony#1538 - [ACL RoleSecurityIdentity] check if instance of Role*symfony/symfony#1748 - Replace Role to RoleInterface for RoleSecurityIdentity*symfony/symfony#4309 - Issue related to custom group (role) and ACL/ACE*symfony/symfony#5026 - potential bug in Symfony\Component\Security\Acl\Domain\RoleSecurityIdentity*symfony/symfony#5076 - [Acl] altered the behaviour of RoleSecurityIdentity*symfony/symfony#5171 - Fix/role security identity*symfony/symfony#5303 - [Security] Check for RoleInterface instead of Role object in RoleSecurityIdentity*symfony/symfony#5909 - Allow Custom Roles to implement the RoleInterface*symfony/symfony#6012 - Securityidentity fix
1 parentb84abc6 commitdd04a2e

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

‎cookbook/security/entity_provider.rst‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -592,21 +592,20 @@ The ``AcmeUserBundle:Group`` entity class defines three table fields (``id``,
592592
``name`` and``role``). The unique``role`` field contains the role name used by
593593
the Symfony security layer to secure parts of the application. The most
594594
important thing to notice is that the``AcmeUserBundle:Group`` entity class
595-
implements the :class:`Symfony\\Component\\Security\\Core\\Role\\RoleInterface`
596-
that forces it to have a``getRole()`` method::
595+
extends the :class:`Symfony\\Component\\Security\\Core\\Role\\Role`::
597596
598597
// src/Acme/Bundle/UserBundle/Entity/Group.php
599598
namespace Acme\UserBundle\Entity;
600599
601-
use Symfony\Component\Security\Core\Role\RoleInterface;
600+
use Symfony\Component\Security\Core\Role\Role;
602601
use Doctrine\Common\Collections\ArrayCollection;
603602
use Doctrine\ORM\Mapping as ORM;
604603
605604
/**
606605
* @ORM\Table(name="acme_groups")
607606
* @ORM\Entity()
608607
*/
609-
class Groupimplements RoleInterface
608+
class Groupextends Role
610609
{
611610
/**
612611
* @ORM\Column(name="id", type="integer")

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp