Jelajahi Sumber

[SecurityBundle] added a note about why a user can be logged in but not authenticated

Fabien Potencier 14 tahun lalu
induk
melakukan
11f42a82dc

+ 7 - 1
src/Symfony/Bundle/SecurityBundle/Resources/views/Collector/security.html.twig

@@ -33,7 +33,13 @@
             </tr>
             </tr>
             <tr>
             <tr>
                 <th>Authenticated?</th>
                 <th>Authenticated?</th>
-                <td>{{ collector.authenticated ? 'yes' : 'no' }}</td>
+                <td>
+                    {% if collector.authenticated %}
+                        yes
+                    {% else %}
+                        no {% if not collector.roles|length %}<em>(probably because the user has no roles)</em>{% endif %}
+                    {% endif %}
+                </td>
             </tr>
             </tr>
             <tr>
             <tr>
                 <th>Roles</th>
                 <th>Roles</th>