Skip to content

Commit bc0c5e2

Browse files
committed
[profiler][security] check authenticated user by tokenClass instead of username.
1 parent a329e40 commit bc0c5e2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Resources/views/Collector/security.html.twig

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
{% extends '@WebProfiler/Profiler/layout.html.twig' %}
22

33
{% block toolbar %}
4-
{% if collector.user %}
4+
{% if collector.tokenClass %}
55
{% set color_code = (collector.enabled and collector.authenticated) ? 'green' : 'yellow' %}
66
{% set authentication_color_code = (collector.enabled and collector.authenticated) ? 'green' : 'red' %}
77
{% set authentication_color_text = (collector.enabled and collector.authenticated) ? 'Yes' : 'No' %}
88
{% else %}
99
{% set color_code = collector.enabled ? 'red' : 'black' %}
1010
{% endif %}
1111
{% set text %}
12-
{% if collector.user %}
12+
{% if collector.tokenClass %}
1313
<div class="sf-toolbar-info-piece">
1414
<b>Logged in as</b>
1515
<span class="sf-toolbar-status sf-toolbar-status-{{ color_code }}">{{ collector.user }}</span>
@@ -47,7 +47,7 @@
4747

4848
{% block panel %}
4949
<h2>Security</h2>
50-
{% if collector.user %}
50+
{% if collector.tokenClass %}
5151
<table>
5252
<tr>
5353
<th>Username</th>

0 commit comments

Comments
 (0)