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

Commit1522de7

Browse files
committed
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.
1 parent7cbad6d commit1522de7

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

‎cookbook/security/entity_provider.rst‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -651,6 +651,11 @@ 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+
The default role voter requires that all of the roles returned should be prefaced byROLE_.
657+
Example ROLE_ADMIN, ROLE_USER; not just ADMIN or USER.
658+
654659
In this example, the ``AcmeUserBundle:User`` entity class defines a
655660
many-to-many relationship with a ``AcmeUserBundle:Role`` entity class.
656661
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