Skip to content

Commit 1e2ce68

Browse files
committed
minor #21548 [Security] Document role hierarchy dump debug command (94noni)
This PR was merged into the 7.4 branch. Discussion ---------- [Security] Document role hierarchy dump debug command close #21350 cc `@damienfern` fyi I got inspiration on text on the workflow dump, but didnt created a new page Commits ------- a6d9c2e Document role hierarchy dump debug command
2 parents 01f0635 + a6d9c2e commit 1e2ce68

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
@@ -2265,6 +2265,18 @@ Users with ``ROLE_SUPER_ADMIN``, will automatically have ``ROLE_ADMIN``,
22652265
:doc:`security voter </security/voters>` that looks for the user roles
22662266
in the database.
22672267

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

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

0 commit comments

Comments
 (0)