8000 Added a small note about dynamic role hierarchies · symfony/symfony-docs@5230e56 · GitHub
[go: up one dir, main page]

Skip to content

Commit 5230e56

Browse files
committed
Added a small note about dynamic role hierarchies
1 parent 1775afb commit 5230e56

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)
0