{% extends 'base.html.twig' %} {% block body %}
{% if is_granted("ROLE_ADMIN") %}

Gestion Utilisateur

{% if is_granted("ROLE_SUPER_ADMIN") %} Supprimer {% if user.active %} Désactiver l'utilisateur {% else %} Activer l'utilisateur {% endif %} {% endif %}
{% endif %}
{% include 'user/userInformation.html.twig' %}
{% if orgs|length >0 %}

Vos applications

{% else %}

Aucune application

{% endif %}
{% for app in apps %}
{% if app.logoMiniUrl %} Logo {{ app.name }} {% endif %}

{{ app.name|title }}

Description : {{ app.descriptionSmall|default('Aucune description disponible.')|raw }}

{# EDITABLE if admin and exactly one UO #} {% if canEditRoles and data.singleUo is not null %}
{# for this app, find its grouped info #} {# Find the group for this specific app #} {% set appGroup = null %} {% for group in data.uoas|default([]) %} {% if group.application.id == app.id %} {% set appGroup = group %} {% endif %} {% endfor %}
{% if appGroup %} {# Use rolesArray: filtered by current user's level (no SUPER ADMIN for plain ADMIN, etc.) #} {% for role in appGroup.rolesArray %} {% endfor %} {% else %}

Aucun rôle défini pour cette application.

{% endif %}
{# READ ONLY otherwise #} {% else %} {% set appGroup = null %} {% for group in data.uoas|default([]) %} {% if group.application.id == app.id %} {% set appGroup = group %} {% endif %} {% endfor %}
{% if appGroup %} {# Use rolesArray: filtered by current user's level (no SUPER ADMIN for plain ADMIN, etc.) #} {% for role in appGroup.rolesArray %} {% endfor %} {% else %}

Aucun rôle défini pour cette application.

{% endif %}
{% endif %}
{% endfor %}
{% endblock %} {% block title %} {% endblock %}