Skip to content

Commit a6d9c2e

Browse files
committed
Document role hierarchy dump debug command
1 parent 62bcb4e commit a6d9c2e

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

security.rst

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2263,6 +2263,18 @@ Users with ``ROLE_SUPER_ADMIN``, will automatically have ``ROLE_ADMIN``,
22632263
:doc:`security voter </security/voters>` that looks for the user roles
22642264
in the database.
22652265

2266+
.. versionadded:: 7.4
2267+
2268+
To help you debug your roles hierarchy, you can generate a visual representation
2269+
of them as SVG or PNG images. First, install the free and open source
2270+
`Mermaid CLI`_, providing the ``mmdc`` command, then executes::
2271+
2272+
.. code-block:: terminal
2273+
2274+
$ php bin/console debug:security:role-hierarchy | mmdc -o roles.svg
2275+
2276+
You can open the file `roles.svg` to see the graph.
2277+
22662278
.. _security-role-authorization:
22672279

22682280
Add Code to Deny Access
@@ -3130,3 +3142,4 @@ Authorization (Denying Access)
31303142
.. _`Login CSRF attacks`: https://en.wikipedia.org/wiki/Cross-site_request_forgery#Forging_login_requests
31313143
.. _`PHP date relative formats`: https://www.php.net/manual/en/datetime.formats.php#datetime.formats.relative
31323144
.. _`Oauth2-client`: https://github.com/thephpleague/oauth2-client
3145+
.. _`Mermaid CLI`: https://github.com/mermaid-js/mermaid-cli

0 commit comments

Comments
 (0)