{# settings/user.html — one account (#5336): who it is and how it signs in, then its name, role and password, disabling it, and Delete at the foot. A refusal (yourself, the last admin, records that name it) is said beside the control rather than discovered by pressing it. #} {% extends "base.html" %} {% from "_macros.html" import crumbs, page_header, status_badge %} {% from "settings/_tabs.html" import settings_tabs %} {% from "account/_email_choices.html" import email_section with context %} {% block title %}{{ user.username }} — Users — Steward{% endblock %} {% block section_tabs %}{{ settings_tabs("users") }}{% endblock %} {% block breadcrumb %}{{ crumbs([("Settings", "/settings/"), ("Users", "/settings/users/"), (user.username, "")]) }}{% endblock %} {% block content %} {% set local = user.auth_source == "local" %} {{ page_header(user.username) }}

{% if user.is_active %}{{ user.role.value|capitalize }}{% else %}{{ status_badge("inactive", "Disabled") }} {{ user.role.value }}{% endif %} · signs in with {{ source }} · {% if last_sign_in %}last signed in {{ last_sign_in|ago }}{% else %}no sign-in on record{% endif %} · {% if not tokens %}no AI tokens{% elif user.id == session.user_id %}{{ tokens }} AI token{{ 's' if tokens != 1 }}{% else %}{{ tokens }} AI token{{ 's' if tokens != 1 }}{% endif %} · added {{ user.created_at|when }}

{% if error %} {% elif done %}
{{ done }}
{% endif %}
{{ csrf_field() }}

Name

{% if not local %}

{{ source }} finds this account by its own id, not by name, so renaming it here does not stop it signing in.

{% endif %}
{% set zone = (user.time_zone or "UTC").split("/", 1)[-1]|replace("_", " ") %} {{ email_section(user, defaults, "this account's own zone (" ~ zone ~ ")", with_address=false, unreachable=not reachable) }}

Role

{% if not local %}

{{ user.role.value|capitalize }}. {{ source }} sets it from the account's groups at every sign-in; the mapping is in Settings › Authentication.

{% else %}
{{ csrf_field() }}
{% if demote_refused %}

{{ demote_refused }}

{% endif %} {% endif %}
{% if local %}
{{ csrf_field() }}

Password

At least {{ min_password }} characters. Give it to them yourself; Steward sends no email for it.
{% endif %}

{{ "Disable" if user.is_active else "Enable" }}

{% if user.is_active %}

A disabled account is signed out at its next click and its AI tokens stop working. Everything it made stays.

{% if disable_refused %}

{{ disable_refused }}

{% else %}
{{ csrf_field() }}
{% endif %} {% else %}

This account can't sign in, and its AI tokens don't work.

{{ csrf_field() }}
{% endif %}

Delete this account

{% if delete_refused %}

{{ delete_refused }}

{% elif holds %}

{{ user.username }} made {{ holds|join(", ") }}, and Steward keeps who did, so this account can't be deleted. Disable it instead.

{% else %}

Its AI tokens go with it. The audit log keeps its name.

{{ csrf_field() }}
{% endif %}
{% endblock %}