Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Open
94noni wants to merge1 commit intosymfony:7.4
base:7.4
Choose a base branch
Loading
from94noni:cli-role-dump
Open
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletionssecurity.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -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.
Copy link
Contributor

Choose a reason for hiding this comment

The 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

Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Why not, lets wait others and decide if its relevant 👍🏻

Copy link
Member

Choose a reason for hiding this comment

The 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!

Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

oki lets keep without,
also is the text ok or should I rework it?


.. _security-role-authorization:

Add Code to Deny Access
Expand DownExpand Up@@ -2597,7 +2609,7 @@

.. code-block:: html+twig

{% set voter_decision = access_decision('post_edit', post) %}

Check failure on line 2612 in security.rst

View workflow job for this annotation

GitHub Actions/ Code Blocks

[Twig] Unknown "access_decision" function.
{% if voter_decision.isGranted() %}
{# ... #}
{% else %}
Expand DownExpand Up@@ -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
Loading

[8]ページ先頭

©2009-2025 Movatter.jp