{% extends "base.html" %} {% block title %}Miembros{% endblock %} {% set me = g.member %} {% set is_owner = me.role == 'owner' %} {% set is_admin = me.role in ('owner', 'admin') %} {% block main %}

Miembros

{% if is_admin %} Dar de alta {% endif %}
{% if is_admin %}{% endif %} {% for m in members %} {% if is_admin %} {% endif %} {% endfor %}
NombreUsuarioRolEstado
{{ m.display_name }}{% if m.id == me.id %} (tú){% endif %} {{ m.gitea_login }} {{ labels[m.role] }} {{ 'Activo' if m.active else 'Suspendido' }} {# The owner is untouchable, so the row shows nothing rather than buttons that would only produce a 403. #} {% if m.role != 'owner' %}
{# Any admin can re-send, not just the owner: the usual reason somebody needs this is that the admin who added them made the account by hand, and waiting for the owner to be around defeats the point. Hidden without an address, because the handler would only refuse. #} {% if m.email and m.active %}
{% endif %} {# A toggle worked while there were two roles. With three it has to be a choice, and the options are the ones this person may actually grant — the handler checks the same thing. #} {% if is_owner or m.role != 'admin' %}
{% endif %} {% if is_owner %} {% if m.role == 'admin' and m.active %}
{% endif %}
{% endif %} {% endif %}

Hay un solo responsable. El responsable da de alta administradores; los administradores dan de alta usuarios. Nadie puede suspender ni degradar al responsable: para dejar el cargo hay que transferirlo a un administrador.

{% endblock %}