Files
FabledSteward/steward/templates/settings/users.html
T
bvandeusenandClaude Opus 5.5 c533eec33a
CI / lint (push) Successful in 2s
CI / integration (push) Successful in 1m3s
CI / unit (push) Successful in 1m31s
CI / publish (push) Successful in 1m21s
feat(settings): Users page — list, add, rename, role, password, disable, delete (#5336)
#5336 "Users page: list accounts, change role, disable, reset a local
password, create a local user".

- Settings › Users (admin only, a Settings tab): every account with how it
  signs in, its role, last sign-in (from the audit log) and working AI
  tokens; disabled accounts last. A row opens the account.
- An account's page: rename (any account), role and password (local
  accounts; an LDAP or single sign-on role comes from the provider at
  every sign-in, and the page says so), disable or enable, and Delete
  behind the confirm dialog.
- Refusals are said beside the control: nobody disables, demotes or
  deletes themselves, the last active admin stays, and an account that
  made alert rules, maintenance windows or playbook runs is disabled
  rather than deleted (those records keep who made them).
- Add user: a local account with a role and a password of 8+ characters.
- Every change is audited as user.*, and the audit log names and links the
  account.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 14:12:56 -04:00

40 lines
2.0 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{# settings/users.html — Settings › Users (#5336): every account, active ones
first. A row opens the account's page. #}
{% extends "base.html" %}
{% from "_macros.html" import crumbs, page_header, status_badge %}
{% from "settings/_tabs.html" import settings_tabs %}
{% block title %}Settings — Users — Steward{% endblock %}
{% block section_tabs %}{{ settings_tabs("users") }}{% endblock %}
{% block breadcrumb %}{{ crumbs([("Settings", "/settings/"), ("Users", "")]) }}{% endblock %}
{% block content %}
{% call page_header("Users") %}<a href="/settings/users/new" class="btn">Add user</a>{% endcall %}
<p class="page-verdict">
{{ users|length }} account{{ 's' if users|length != 1 }}
· {{ admins }} active admin{{ 's' if admins != 1 }}
{%- if disabled %} · <span class="tone-muted">{{ disabled }} disabled</span>{% endif %}
</p>
<div class="card-flush">
<table class="table">
<thead><tr><th>User</th><th>Signs in with</th><th>Role</th><th>Last sign-in</th><th class="num">AI tokens</th></tr></thead>
<tbody>
{% for u in users %}
<tr class="row-link{% if not u.is_active %} row-off{% endif %}">
<td class="cell-name">
<a class="row-target" href="/settings/users/{{ u.id }}">{{ u.username }}</a>
{%- if u.id == session.user_id %} <span class="tone-dim">(you)</span>{% endif %}
<div class="cell-sub">{{ u.email }}</div>
</td>
<td>{{ sources.get(u.auth_source, u.auth_source) }}</td>
<td>{{ u.role.value|capitalize }}{% if not u.is_active %} {{ status_badge("inactive", "Disabled") }}{% endif %}</td>
<td class="nowrap">{% if last.get(u.id) %}{{ last[u.id]|ago }}{% else %}—{% endif %}</td>
<td class="num">{{ tokens.get(u.id, 0) or "—" }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
<p class="field-hint">Accounts that sign in with LDAP or single sign-on are added at their first sign-in, with the role their provider's groups give them (Settings › <a href="/settings/auth/">Authentication</a>).</p>
{% endblock %}