• {% if is_granted('IS_AUTHENTICATED_FULLY') %} {{ app.user.username }} {% else %} {{ "Not logged in"|trans }} {% endif %}
      {% if is_granted('IS_AUTHENTICATED_FULLY') %} {# Show secure/user and secure/admin links depending on user role. ROLE_ADMIN inherits from ROLE_USER (see role_hierarchy in security.yml, so the secure_user link is shown for all logged in users. #} {% if is_granted('ROLE_USER') %}
    • {{ "Secure User Page"|trans }}
    • {% endif %} {% if is_granted('ROLE_ADMIN') %}
    • {{ "Secure Admin Page"|trans }}
    • {% endif %}
    • Logout
    • {% else %}
    • Login
    • {% endif %}