浏览代码

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

Fabien Potencier 14 年之前
父节点
当前提交
11f42a82dc
共有 1 个文件被更改,包括 7 次插入1 次删除
  1. 7 1
      src/Symfony/Bundle/SecurityBundle/Resources/views/Collector/security.html.twig

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

@@ -33,7 +33,13 @@
             </tr>
             <tr>
                 <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>
                 <th>Roles</th>