{% extends '@WebProfiler/Profiler/layout.html.twig' %} {% block toolbar %} {% if collector.user %} {% set color_code = (collector.enabled and collector.authenticated) ? 'green' : 'yellow' %} {% set authentication_color_code = (collector.enabled and collector.authenticated) ? 'green' : 'red' %} {% set authentication_color_text = (collector.enabled and collector.authenticated) ? 'Yes' : 'No' %} {% else %} {% set color_code = collector.enabled ? 'red' : 'black' %} {% endif %} {% set text %} {% if collector.user %}
Logged in as {{ collector.user }}
Authenticated {{ authentication_color_text }}
{% if collector.tokenClass != null %}
Token class {{ collector.tokenClass|abbr_class }}
{% endif %} {% elseif collector.enabled %} You are not authenticated. {% else %} The security is disabled. {% endif %} {% endset %} {% set icon %} Security {% if collector.user %}
{{ collector.user }}
{% endif %} {% endset %} {% include '@WebProfiler/Profiler/toolbar_item.html.twig' with { 'link': profiler_url } %} {% endblock %} {% block menu %} Security {% endblock %} {% block panel %}

Security

{% if collector.user %} {% if collector.tokenClass != null %} {% endif %}
Username {{ collector.user }}
Authenticated? {% if collector.authenticated %} yes {% else %} no {% if not collector.roles|length %}(probably because the user has no roles){% endif %} {% endif %}
Roles {{ collector.roles|yaml_encode }}
Token class {{ collector.tokenClass }}
{% elseif collector.enabled %}

No token

{% else %}

The security component is disabled

{% endif %} {% endblock %}