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

Appearance settings

Conversation

damienfern
Copy link
Contributor

@damienfern damienfern commented Sep 18, 2025

Q A
Branch? 7.4
Bug fix? no
New feature? yes
Deprecations? no
License MIT

As promised here, here it is. This PR adds the role hierarchy chart to the security panel of the profiler.

Here is how it looks (heavily inspired by the workflow graph) :

image

Copy link
Contributor

@94noni 94noni left a comment

Choose a reason for hiding this comment

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

@damienfern waw very nice one! I like it

may I ask you how difficult/challenging (if doable) can it be to do the "second part" of my comment?
related to visualizing the current request user roles inside this newly added graph?

(for example take as comparison the voter part with granted/denied etc with green/red or highlighted color)

</tr>

{% if collector.supportsRoleHierarchy %}
<script>
Copy link
Contributor

Choose a reason for hiding this comment

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

perhaps check if the data is not null/not empty before loading all this?

Copy link
Member

Choose a reason for hiding this comment

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

That's a good idea indeed.

@OskarStark
Copy link
Contributor

Maybe rename "Roles Diagram" to "Available Roles"? I mean it is clear that this is a diagram

@damienfern
Copy link
Contributor Author

damienfern commented Sep 22, 2025

@damienfern waw very nice one! I like it

may I ask you how difficult/challenging (if doable) can it be to do the "second part" of my comment? related to visualizing the current request user roles inside this newly added graph?

(for example take as comparison the voter part with granted/denied etc with green/red or highlighted color)

I still have it in mind, but no idea how to do it. I pushed this PR first so once it is merged, I can start working on it.

@damienfern damienfern force-pushed the feat/dump_roles_in_profiler branch from 647552e to d4034b7 Compare September 23, 2025 10:02
</tr>

{% if collector.supportsRoleHierarchy %}
<script>
Copy link
Member

Choose a reason for hiding this comment

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

That's a good idea indeed.

Copy link
Member

@alexandre-daubois alexandre-daubois left a comment

Choose a reason for hiding this comment

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

Otherwise LGTM after @94noni suggestion

Comment on lines +226 to +228
if (null !== $this->roleHierarchy) {
$this->data['roles_diagram'] = $this->mermaidDumper->dump($this->roleHierarchy);
}
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
if (null !== $this->roleHierarchy) {
$this->data['roles_diagram'] = $this->mermaidDumper->dump($this->roleHierarchy);
}
if ($this->roleHierarchy) {
$this->data['roles_diagram'] = $this->mermaidDumper->dump($this->roleHierarchy);
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.