|
16 | 16 | {% endset %}
|
17 | 17 |
|
18 | 18 | {% 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> |
24 | 25 |
|
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> |
29 | 30 |
|
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> |
35 | 39 | {% endif %}
|
| 40 | + |
36 | 41 | {% 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> |
41 | 46 | {% 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> |
47 | 53 | {% endif %}
|
48 |
| - {% elseif collector.enabled %} |
49 |
| - <div class="sf-toolbar-info-piece"> |
50 |
| - <span>You are not authenticated.</span> |
51 |
| - </div> |
52 | 54 | {% else %}
|
53 | 55 | <div class="sf-toolbar-info-piece">
|
54 | 56 | <span>The security is disabled.</span>
|
|
0 commit comments