Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork5.3k
Document role hierarchy dump debug command#21548
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:7.4
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Changes fromall commits
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -2263,6 +2263,18 @@ | ||
| :doc:`security voter </security/voters>` 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. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. Wdyt about adding an image as example ? As it's done in dump workflow documentation There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. Why not, lets wait others and decide if its relevant 👍🏻 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. I wouldn't add an image here because the command is simple and easy to understand. Also, images add a maintenance burden to the docs since they must be kept up to date. Thanks! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. oki lets keep without, | ||
| .. _security-role-authorization: | ||
| Add Code to Deny Access | ||
| @@ -2597,7 +2609,7 @@ | ||
| .. code-block:: html+twig | ||
| {% set voter_decision = access_decision('post_edit', post) %} | ||
| {% if voter_decision.isGranted() %} | ||
| {# ... #} | ||
| {% else %} | ||
| @@ -3130,3 +3142,4 @@ | ||
| .. _`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 | ||
Uh oh!
There was an error while loading.Please reload this page.