diff --git a/security.rst b/security.rst index 0c3df87de10..a83d03151d2 100644 --- a/security.rst +++ b/security.rst @@ -2263,6 +2263,18 @@ Users with ``ROLE_SUPER_ADMIN``, will automatically have ``ROLE_ADMIN``, :doc:`security voter ` that looks for the user roles in the database. +.. versionadded:: 7.4 + + To help you debug your roles hierarchy, you can generate a visual representation + of them as SVG or PNG images. First, install the free and open source + `Mermaid CLI`_, providing the ``mmdc`` command, then executes:: + + .. code-block:: terminal + + $ php bin/console debug:security:role-hierarchy | mmdc -o roles.svg + + You can open the file `roles.svg` to see the graph. + .. _security-role-authorization: Add Code to Deny Access @@ -3130,3 +3142,4 @@ Authorization (Denying Access) .. _`Login CSRF attacks`: https://en.wikipedia.org/wiki/Cross-site_request_forgery#Forging_login_requests .. _`PHP date relative formats`: https://www.php.net/manual/en/datetime.formats.php#datetime.formats.relative .. _`Oauth2-client`: https://github.com/thephpleague/oauth2-client +.. _`Mermaid CLI`: https://github.com/mermaid-js/mermaid-cli