-
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
[SecurityBundle] add role hierarchy graph to profiler security panel #61786
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 8.1
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -3,9 +3,9 @@ CHANGELOG | |||||
|
|
||||||
| 7.4 | ||||||
| --- | ||||||
|
|
||||||
| * Add role hierarchy graph to the profiler security panel | ||||||
| * Add `debug:security:role-hierarchy` command to dump role hierarchy graphs in the Mermaid.js flowchart format | ||||||
| * Add `Security::getAccessDecision()` and `getAccessDecisionForUser()` helpers | ||||||
| * Add `Security::getAccessDecision()` and `getAccessDecisionForUser()` helpers | ||||||
|
Contributor
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.
Suggested change
|
||||||
| * Add options to configure a cache pool and storage service for login throttling rate limiters | ||||||
| * Register alias for argument for password hasher when its key is not a class name: | ||||||
|
|
||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -246,11 +246,48 @@ | |
| </td> | ||
| </tr> | ||
|
|
||
| {% if collector.supportsRoleHierarchy %} | ||
| {% if collector.supportsRoleHierarchy and collector.rolesDiagram is not empty %} | ||
| <script> | ||
|
Contributor
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. perhaps check if the data is not null/not empty before loading all this?
Member
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. That's a good idea indeed. |
||
| {{ source('@WebProfiler/Script/Mermaid/mermaid-flowchart-v2.min.js') }} | ||
| const isDarkMode = document.querySelector('body').classList.contains('theme-dark'); | ||
| mermaid.initialize({ | ||
| flowchart: { | ||
| useMaxWidth: true, | ||
| }, | ||
| securityLevel: 'loose', | ||
| theme: 'base', | ||
| themeVariables: { | ||
| darkMode: isDarkMode, | ||
| fontFamily: 'var(--font-family-system)', | ||
| fontSize: 'var(--font-size-body)', | ||
| // the properties below don't support CSS variables | ||
| primaryColor: isDarkMode ? 'lightsteelblue' : 'aliceblue', | ||
| primaryTextColor: isDarkMode ? '#000' : '#000', | ||
| primaryBorderColor: isDarkMode ? 'steelblue' : 'lightsteelblue', | ||
| lineColor: isDarkMode ? '#939393' : '#d4d4d4', | ||
| secondaryColor: isDarkMode ? 'lightyellow' : 'lightyellow', | ||
| tertiaryColor: isDarkMode ? 'lightSalmon' : 'lightSalmon', | ||
| } | ||
| }); | ||
| document.addEventListener('DOMContentLoaded', () => { | ||
| const mEl = document.querySelector('.sf-mermaid'); | ||
| mermaid.run({ | ||
| nodes: [mEl], | ||
| }); | ||
| }); | ||
| </script> | ||
| <tr> | ||
| <th>Inherited Roles</th> | ||
| <td>{{ collector.inheritedRoles is empty ? 'none' : profiler_dump(collector.inheritedRoles, maxDepth: 1) }}</td> | ||
| </tr> | ||
| <tr> | ||
| <th>Available Roles</th> | ||
| <td> | ||
| <pre class="sf-mermaid"> | ||
| {{ collector.rolesDiagram|raw }} | ||
| </pre> | ||
| </td> | ||
| </tr> | ||
| {% endif %} | ||
|
|
||
| {% if collector.token %} | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.