Skip to content

Commit 0ede18f

Browse files
committed
Merge branch '7.4' into 8.0
* 7.4: Minor reword Document role hierarchy dump debug command
2 parents f4b89a9 + bcca6cd commit 0ede18f

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

security.rst

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1883,6 +1883,22 @@ Users with ``ROLE_SUPER_ADMIN``, will automatically have ``ROLE_ADMIN``,
18831883
:doc:`security voter </security/voters>` that looks for the user roles
18841884
in the database.
18851885

1886+
.. tip::
1887+
1888+
To help debug your roles hierarchy, you can generate a visual representation
1889+
of it as an SVG or PNG image. First, install the free and open-source
1890+
`Mermaid CLI`_, which provides the ``mmdc`` command, and then run:
1891+
1892+
.. code-block:: terminal
1893+
1894+
$ php bin/console debug:security:role-hierarchy | mmdc -o roles.svg
1895+
1896+
You can then open the ``roles.svg`` file to see the generated graph.
1897+
1898+
.. versionadded:: 7.4
1899+
1900+
The ``debug:security:role-hierarchy`` command was introduced in Symfony 7.4.
1901+
18861902
.. _security-role-authorization:
18871903

18881904
Add Code to Deny Access
@@ -2617,3 +2633,4 @@ Authorization (Denying Access)
26172633
.. _`Login CSRF attacks`: https://en.wikipedia.org/wiki/Cross-site_request_forgery#Forging_login_requests
26182634
.. _`PHP date relative formats`: https://www.php.net/manual/en/datetime.formats.php#datetime.formats.relative
26192635
.. _`Oauth2-client`: https://github.com/thephpleague/oauth2-client
2636+
.. _`Mermaid CLI`: https://github.com/mermaid-js/mermaid-cli

0 commit comments

Comments
 (0)