Skip to content

Commit cd69493

Browse files
committed
minor #9865 Added a small note about dynamic role hierarchies (javiereguiluz)
This PR was squashed before being merged into the 2.8 branch (closes #9865). Discussion ---------- Added a small note about dynamic role hierarchies This fixes #9745. @dmaicher would this pull request be in line with your comments here: symfony/symfony#21853 (comment) ? Thanks! Commits ------- 5230e56 Added a small note about dynamic role hierarchies
2 parents 8ce6323 + 5230e56 commit cd69493

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

security.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1254,6 +1254,13 @@ In the above configuration, users with ``ROLE_ADMIN`` role will also have the
12541254
``ROLE_USER`` role. The ``ROLE_SUPER_ADMIN`` role has ``ROLE_ADMIN``, ``ROLE_ALLOWED_TO_SWITCH``
12551255
and ``ROLE_USER`` (inherited from ``ROLE_ADMIN``).
12561256

1257+
.. note::
1258+
1259+
The value of the ``role_hierarchy`` option is defined statically, so you
1260+
can't for example store the role hierarchy in a database. If you need that,
1261+
create a custom :doc:`security voter </security/voters>` that looks for the
1262+
user roles in the database.
1263+
12571264
Final Words
12581265
-----------
12591266

0 commit comments

Comments
 (0)