#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>
55 lines
2.9 KiB
HTML
55 lines
2.9 KiB
HTML
{# settings/user_new.html — add an account that signs in with a Steward password (#5336). #}
|
|
{% extends "base.html" %}
|
|
{% from "_macros.html" import crumbs, page_header %}
|
|
{% from "settings/_tabs.html" import settings_tabs %}
|
|
{% block title %}Add user — Settings — Steward{% endblock %}
|
|
{% block section_tabs %}{{ settings_tabs("users") }}{% endblock %}
|
|
{% block breadcrumb %}{{ crumbs([("Settings", "/settings/"), ("Users", "/settings/users/"), ("Add user", "")]) }}{% endblock %}
|
|
{% block content %}
|
|
{{ page_header("Add user", "Signs in with a Steward password.") }}
|
|
{% if error %}<div class="alert alert-error" role="alert">{{ error }}</div>{% endif %}
|
|
|
|
<form method="post" action="/settings/users/new" class="form-page">{{ csrf_field() }}
|
|
<section class="card form-section" aria-labelledby="new-account">
|
|
<h2 id="new-account" class="section-title">Account</h2>
|
|
<div class="form-pair">
|
|
<div class="field">
|
|
<label class="field-label" for="new-username">Username</label>
|
|
<input class="input" id="new-username" type="text" name="username" maxlength="64"
|
|
value="{{ form.get('username', '') }}" required autocomplete="off">
|
|
</div>
|
|
<div class="field">
|
|
<label class="field-label" for="new-email">Email</label>
|
|
<input class="input" id="new-email" type="email" name="email" maxlength="255"
|
|
value="{{ form.get('email', '') }}" required autocomplete="off">
|
|
</div>
|
|
</div>
|
|
<div class="field">
|
|
<label class="field-label" for="new-role">Role</label>
|
|
<select class="input" id="new-role" name="role">
|
|
{% for r in roles %}<option value="{{ r.value }}" {% if form.get('role', 'viewer') == r.value %}selected{% endif %}>{{ r.value|capitalize }}</option>{% endfor %}
|
|
</select>
|
|
<span class="field-hint">A viewer reads; an operator also runs playbooks and changes monitors, hosts and alerts; an admin also changes Settings and users.</span>
|
|
</div>
|
|
</section>
|
|
<section class="card form-section" aria-labelledby="new-password">
|
|
<h2 id="new-password" class="section-title">Password</h2>
|
|
<div class="form-pair">
|
|
<div class="field">
|
|
<label class="field-label" for="new-pw">Password</label>
|
|
<input class="input" id="new-pw" type="password" name="password" minlength="{{ min_password }}" required autocomplete="new-password">
|
|
<span class="field-hint">At least {{ min_password }} characters. Give it to them yourself; Steward sends no email for it.</span>
|
|
</div>
|
|
<div class="field">
|
|
<label class="field-label" for="new-pw2">Again</label>
|
|
<input class="input" id="new-pw2" type="password" name="confirm" required autocomplete="new-password">
|
|
</div>
|
|
</div>
|
|
</section>
|
|
<div class="form-actions">
|
|
<button type="submit" class="btn">Add user</button>
|
|
<a href="/settings/users/" class="btn btn-ghost">Cancel</a>
|
|
</div>
|
|
</form>
|
|
{% endblock %}
|