Permalink
Browse files

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 label
f856641 Add label book-security-roles
9d13930 Add formatting, links, and clarity
1522de7 Caution that roles should start with ROLE_
  • Loading branch information...
weaverryan committed Sep 16, 2014
2 parents 78eea60 + 749996b commit 46fcb678392e2f0c8f0bbe34a94f01429e256a4a
Showing with 10 additions and 0 deletions.
  1. +2 −0 book/security.rst
  2. +8 −0 cookbook/security/entity_provider.rst
@@ -1652,6 +1652,8 @@ the default for the firewall as a whole).
For more information about user provider and firewall configuration, see
the :doc:`/reference/configuration/security`.
.. _book-security-roles:
Roles
-----
@@ -651,6 +651,14 @@ about in this section.
If you fail to return any roles, it may appear as if your user isn't
authenticated at all.
.. caution::
In order to work with the security configuration examples on this page
all roles must be prefixed with ``ROLE_`` (see
the :ref:`section about roles <book-security-roles>` in the book). For
example, your roles will be ``ROLE_ADMIN`` or ``ROLE_USER`` instead of
``ADMIN`` or ``USER``.
In this example, the ``AcmeUserBundle:User`` entity class defines a
many-to-many relationship with a ``AcmeUserBundle:Role`` entity class.
A user can be related to several roles and a role can be composed of

0 comments on commit 46fcb67

Please sign in to comment.