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

Commit46fcb67

Browse files
committed
minor#4218 Caution that roles should start with ROLE_ (jrjohnson)
This PR was merged into the 2.3 branch.Discussion----------Caution that roles should start with ROLE_In order to save someone else a few hours of frustration make it clear that the ROLE_ preface is not just for show.| Q | A| ------------- | ---| Doc fix? | yes| New docs? | no| Applies to | all| Fixed tickets |Commits-------749996b Fix reference labelf856641 Add label book-security-roles9d13930 Add formatting, links, and clarity1522de7 Caution that roles should start with ROLE_
2 parents78eea60 +749996b commit46fcb67

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

‎book/security.rst‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1652,6 +1652,8 @@ the default for the firewall as a whole).
16521652
For more information about user provider and firewall configuration, see
16531653
the:doc:`/reference/configuration/security`.
16541654

1655+
.. _book-security-roles:
1656+
16551657
Roles
16561658
-----
16571659

‎cookbook/security/entity_provider.rst‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -651,6 +651,14 @@ about in this section.
651651
If you fail to return any roles, it may appear as if your user isn't
652652
authenticated at all.
653653

654+
..caution::
655+
656+
In order to work with the security configuration examples on this page
657+
all roles must be prefixed with ``ROLE_`` (see
658+
the:ref:`section about roles<book-security-roles>` in the book). For
659+
example, your roles will be ``ROLE_ADMIN`` or ``ROLE_USER`` instead of
660+
``ADMIN`` or ``USER``.
661+
654662
In this example, the ``AcmeUserBundle:User`` entity class defines a
655663
many-to-many relationship with a ``AcmeUserBundle:Role`` entity class.
656664
A user can be related to several roles and a role can be composed of

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp