8000 Display the inherited roles of the logged-in user in the Web Debug To… · symfony/symfony@4c26c45 · GitHub
[go: up one dir, main page]

Skip to content

Commit 4c26c45

Browse files
committed
Display the inherited roles of the logged-in user in the Web Debug Toolbar
1 parent 504c051 commit 4c26c45

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

src/Symfony/Bundle/SecurityBundle/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
CHANGELOG
22
=========
33

4+
6.1
5+
---
6+
7+
* Display the inherited roles of the logged-in user in the Web Debug Toolbar
8+
49
6.0
510
---
611

src/Symfony/Bundle/SecurityBundle/Resources/views/Collector/security.html.twig

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,26 @@
4646
</span>
4747
</div>
4848

49+
{% if collector.supportsRoleHierarchy %}
50+
<div class="sf-toolbar-info-piece">
51+
<b>Inherited Roles</b>
52+
<span>
53+
{% if collector.inheritedRoles is empty %}
54+
none
55+
{% else %}
56+
{% set remainingRoles = collector.inheritedRoles|slice(1) %}
57+
{{ collector.inheritedRoles|first }}
58+
{% if remainingRoles is not empty %}
59+
+
60+
<abbr title="{{ remainingRoles|join(', ') }}">
61+
{{ remainingRoles|length }} more
62+
</abbr>
63+
{% endif %}
64+
{% endif %}
65+
</span>
66+
</div>
67+
{% endif %}
68+
4969
<div class="sf-toolbar-info-piece">
5070
<b>Token class</b>
5171
<span>{{ collector.tokenClass|abbr_class }}</span>

0 commit comments

Comments
 (0)
0