{% extends "admin/layout.html" %} {% block title %}Admin Accounts – Admin{% endblock %} {% block body %}

{% trans %}Admin Accounts{% endtrans %}

{% trans %}Main Admin Only{% endtrans %}
{% with messages = get_flashed_messages(with_categories=true) %}{% for cat, msg in messages %}{% endfor %}{% endwith %}

{% trans %}Add Sub-Admin{% endtrans %}

{% trans %}Sub-admins get full admin access. They can optionally set up their own 2FA from their profile page. Only you can reset their 2FA.{% endtrans %}

{% trans %}Sub-Admin Accounts{% endtrans %} ({{ admins|length }})

{% if admins %}
{% for admin in admins %}
{{ admin.username[0].upper() }}
{{ admin.username }} {% if admin.is_active %} {% trans %}Active{% endtrans %} {% else %} {% trans %}Inactive{% endtrans %} {% endif %} {% if admin.totp_enabled %} {% trans %}2FA On{% endtrans %} {% endif %}
{{ admin.email or '—' }} • {% trans %}Added{% endtrans %} {{ admin.created_at[:10] if admin.created_at else '—' }}
{% if admin.totp_enabled %}
{% endif %}
{% endfor %}
{% else %}

{% trans %}No sub-admin accounts yet.{% endtrans %}

{% trans %}Use the form on the left to add one.{% endtrans %}

{% endif %}

{% trans %}Emergency 2FA Bypass (Main Admin){% endtrans %}

{% trans %}If your authenticator app stops working and you cannot log in, set ADMIN_BYPASS_2FA=1 in your .env file and restart the app. This lets you log in without a 2FA code. Once logged in, disable 2FA from your profile page, then remove the env var.{% endtrans %}

{% trans %}Alternatively, run python reset-admin-2fa.py on the server to wipe the TOTP secret directly from the database.{% endtrans %}

{% endblock %}