8000 feature #42800 Display the roles of the logged-in user in the Web Deb… · symfony/symfony@47385e5 · GitHub
[go: up one dir, main page]

Skip to content

Commit 47385e5

Browse files
committed
feature #42800 Display the roles of the logged-in user in the Web Debug Toolbar (NicoHaase)
This PR was merged into the 5.4 branch. Discussion ---------- Display the roles of the logged-in user in the Web Debug Toolbar | Q | A | ------------- | --- | Branch? | 5.4 for features | Bug fix? | no | New feature? | yes | Deprecations? | yes/no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files --> | Tickets | Fix #42763 | License | MIT | Doc PR | - This PR adds the roles of the logged-in user to the WDT Commits ------- 1460732 Display the roles of the logged-in user in the Web Debug Toolbar
2 parents 2ebb835 + 1460732 commit 47385e5

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

src/Symfony/Bundle/SecurityBundle/CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ CHANGELOG
1414
* Deprecate passing an array of arrays as 1st argument to `MainConfiguration`, pass a sorted flat array of
1515
factories instead.
1616
* Deprecate the `always_authenticate_before_granting` option
17+
* Display the roles of the logged-in user in the Web Debug Toolbar
1718

1819
5.3
1920
---

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

+14
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,20 @@
4141
<span class="sf-toolbar-status sf-toolbar-status-{{ is_authenticated ? 'green' : 'yellow' }}">{{ is_authenticated ? 'Yes' : 'No' }}</span>
4242
</div>
4343

44+
<div class="sf-toolbar-info-piece">
45+
<b>Roles</b>
46+
<span>
47+
{% set remainingRoles = collector.roles|slice(1) %}
48+
{{ collector.roles|first }}
49+
{% if remainingRoles|length > 1 %}
50+
+
51+
<abbr title="{{ remainingRoles|join(', ') }}">
52+
{{ remainingRoles|length }} more
53+
</abbr>
54+
{% endif %}
55+
</span>
56+
</div>
57+
4458
<div class="sf-toolbar-info-piece">
4559
<b>Token class</b>
4660
<span>{{ collector.tokenClass|abbr_class }}</span>

0 commit comments

Comments
 (0)
0