Skip to content

Commit d81da79

Browse files
chalasrfabpot
authored andcommitted
[SecurityBundle] Display firewall in debug bar even if not authenticated
1 parent 4459598 commit d81da79

File tree

1 file changed

+29
-27
lines changed

1 file changed

+29
-27
lines changed

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

Lines changed: 29 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -16,39 +16,41 @@
1616
{% endset %}
1717

1818
{% set text %}
19-
{% if collector.token %}
20-
<div class="sf-toolbar-info-piece">
21-
<b>Logged in as</b>
22-
<span>{{ collector.user }}</span>
23-
</div>
19+
{% if collector.enabled %}
20+
{% if collector.token %}
21+
<div class="sf-toolbar-info-piece">
22+
<b>Logged in as</b>
23+
<span>{{ collector.user }}</span>
24+
</div>
2425

25-
<div class="sf-toolbar-info-piece">
26-
<b>Authenticated</b>
27-
<span class="sf-toolbar-status sf-toolbar-status-{{ is_authenticated ? 'green' : 'red' }}">{{ is_authenticated ? 'Yes' : 'No' }}</span>
28-
</div>
26+
<div class="sf-toolbar-info-piece">
27+
<b>Authenticated</b>
28+
<span class="sf-toolbar-status sf-toolbar-status-{{ is_authenticated ? 'green' : 'red' }}">{{ is_authenticated ? 'Yes' : 'No' }}</span>
29+
</div>
2930

30-
{% if collector.token != null %}
31-
<div class="sf-toolbar-info-piece">
32-
<b>Token class</b>
33-
<span>{{ collector.tokenClass|abbr_class }}</span>
34-
</div>
31+
<div class="sf-toolbar-info-piece">
32+
<b>Token class</b>
33+
<span>{{ collector.tokenClass|abbr_class }}</span>
34+
</div>
35+
{% else %}
36+
<div class="sf-toolbar-info-piece">
37+
<span>You are not authenticated.</span>
38+
</div>
3539
{% endif %}
40+
3641
{% if collector.firewall %}
37-
<div class="sf-toolbar-info-piece">
38-
<b>Firewall name</b>
39-
<span>{{ collector.firewall.name }}</span>
40-
</div>
42+
<div class="sf-toolbar-info-piece">
43+
<b>Firewall name</b>
44+
<span>{{ collector.firewall.name }}</span>
45+
</div>
4146
{% endif %}
42-
{% if collector.logoutUrl %}
43-
<div class="sf-toolbar-info-piece">
44-
<b>Actions</b>
45-
<span><a href="{{ collector.logoutUrl }}">Logout</a></span>
46-
</div>
47+
48+
{% if collector.token and collector.logoutUrl %}
49+
<div class="sf-toolbar-info-piece">
50+
<b>Actions</b>
51+
<span><a href="{{ collector.logoutUrl }}">Logout</a></span>
52+
</div>
4753
{% endif %}
48-
{% elseif collector.enabled %}
49-
<div class="sf-toolbar-info-piece">
50-
<span>You are not authenticated.</span>
51-
</div>
5254
{% else %}
5355
<div class="sf-toolbar-info-piece">
5456
<span>The security is disabled.</span>

0 commit comments

Comments
 (0)