{% extends "tesm_core/base.html" %} {% from "tesm_core/macros.html" import field, select_field, checkbox, pill, search_box, modal, empty_state, alert %} {% block page_title %}Benutzer{% endblock %} {% block page_sub %}{{ users | length }} Konten · Rechte kommen ausschliesslich aus Gruppen{% endblock %} {% block topbar_extra %} {{ search_box('users-table', 'Benutzer suchen ...', count_id='users-visible') }} {% if current_user.has('users.create') %} {% endif %} {% endblock %} {% block content %}
{{ users | length }} sichtbar {% if directory_enabled and current_user.has('users.create') %} {% endif %} {% if current_user.is_admin %} {{ icon('activity', size=15) }} Sitzungen {% endif %}
{% for user in users %} {% endfor %}
Benutzer Name Quelle Gruppen Status Letzte Anmeldung Aktion
{{ user.username }}
{% if user.email %}
{{ user.email }}
{% endif %}
{{ (user.first_name ~ ' ' ~ user.last_name) | trim or '–' | safe }} {% if user.auth_source == 'ldap' %} {{ pill('Verzeichnis', 'info') }} {% else %} {{ pill('Lokal', '') }} {% endif %} {% if user.is_admin %}{{ pill('Administrator', 'accent') }}{% endif %} {{ user.group_names | join(', ') or ('–' | safe if not user.is_admin else '') }} {% if user.is_locked %}{{ pill('Gesperrt', 'danger') }} {% else %}{{ pill('Aktiv', 'online') }}{% endif %} {% if user.totp_enabled %}{{ icon('lock', size=14) }}{% endif %} {% if user.must_change_password %}{{ pill('Passwortwechsel', 'warning') }}{% endif %} {% if user.last_login_at %} {{ user.last_login_at | dt }} {% else %}noch nie{% endif %} {% if current_user.has('users.edit') %} {% endif %} {% if current_user.has('users.delete') %}
{% endif %}
{% if not users %} {{ empty_state('Keine Konten vorhanden', 'Legen Sie das erste Konto an.', 'users') }} {% endif %}
{{ alert('Rechte werden ausschliesslich über Gruppen vergeben. Das Admin-Kennzeichen ist davon unabhängig und kann nur von Administratoren gesetzt werden; mindestens ein entsperrtes Administratorkonto muss immer bestehen bleiben.', 'info') }} {% endblock %} {% block dialogs %} {% if current_user.has('users.create') %} {% call modal('user-new', 'Konto anlegen', 'Lokales Konto mit eigenem Passwort') %}
{% endcall %} {% if directory_enabled %} {% call modal('user-directory', 'Aus Verzeichnis übernehmen', 'Konto vorbereiten, damit Gruppen vor der ersten Anmeldung sitzen') %}
{% endcall %} {% endif %} {% endif %} {% if current_user.has('users.edit') %} {% for user in users %} {% call modal('user-edit-' ~ user.id, 'Konto ' ~ user.username, 'Verzeichniskonto' if user.auth_source == 'ldap' else 'Lokales Konto') %}
{% endcall %} {% endfor %} {% endif %} {% endblock %}