multi-user: users, per-user profiles/filters/notifications, tab UI, apply forensics
* DB: users + user_profiles/filters/notifications/preferences; applications gets user_id + forensics_json + profile_snapshot_json; new errors table with 14d retention; schema versioning via MIGRATIONS list * auth: password hashes in DB (argon2); env vars seed first admin; per-user sessions; CSRF bound to user id * apply: personal info/WBS moved out of env into the request body; providers take an ApplyContext with Profile + submit_forms; full Playwright recorder (step log, console, page errors, network, screenshots, final HTML) * web: five top-level tabs (Wohnungen/Bewerbungen/Logs/Fehler/Einstellungen); settings sub-tabs profil/filter/benachrichtigungen/account/benutzer; per-user matching, auto-apply and notifications (UI/Telegram/SMTP); red auto-apply switch on Wohnungen tab; forensics detail view for bewerbungen and fehler; retention background thread Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
e663386a19
commit
c630b500ef
36 changed files with 2763 additions and 1113 deletions
50
web/templates/_settings_users.html
Normal file
50
web/templates/_settings_users.html
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
<h2 class="font-semibold mb-4">Benutzer verwalten</h2>
|
||||
|
||||
{% if request.query_params.get('ok') %}<div class="chip chip-ok mb-4">Benutzer angelegt.</div>{% endif %}
|
||||
{% if request.query_params.get('err') == 'exists' %}<div class="chip chip-bad mb-4">Benutzername existiert bereits.</div>{% endif %}
|
||||
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
|
||||
<div>
|
||||
<h3 class="font-semibold mb-2">Neuen Benutzer anlegen</h3>
|
||||
<form method="post" action="/actions/users/create" class="space-y-3 max-w-md">
|
||||
<input type="hidden" name="csrf" value="{{ csrf }}">
|
||||
<div>
|
||||
<label class="block text-xs uppercase text-slate-500 mb-1">Benutzername</label>
|
||||
<input class="input" name="username" required>
|
||||
</div>
|
||||
<div>
|
||||
<label class="block text-xs uppercase text-slate-500 mb-1">Passwort (≥ 10 Zeichen)</label>
|
||||
<input class="input" type="password" name="password" required>
|
||||
</div>
|
||||
<label class="inline-flex items-center gap-2">
|
||||
<input type="checkbox" name="is_admin">
|
||||
<span>Admin-Rechte</span>
|
||||
</label>
|
||||
<button class="btn btn-primary" type="submit">Anlegen</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<h3 class="font-semibold mb-2">Alle Benutzer</h3>
|
||||
<div class="card divide-y divide-soft">
|
||||
{% for u in users %}
|
||||
<div class="px-3 py-2 flex items-center gap-2 text-sm">
|
||||
<span class="flex-1">{{ u.username }}</span>
|
||||
{% if u.is_admin %}<span class="chip chip-info">admin</span>{% endif %}
|
||||
{% if u.disabled %}<span class="chip chip-bad">deaktiviert</span>
|
||||
{% else %}<span class="chip chip-ok">aktiv</span>{% endif %}
|
||||
{% if u.id != user.id %}
|
||||
<form method="post" action="/actions/users/disable">
|
||||
<input type="hidden" name="csrf" value="{{ csrf }}">
|
||||
<input type="hidden" name="target_id" value="{{ u.id }}">
|
||||
<input type="hidden" name="value" value="{% if u.disabled %}off{% else %}on{% endif %}">
|
||||
<button class="btn btn-ghost text-xs" type="submit">
|
||||
{% if u.disabled %}aktivieren{% else %}deaktivieren{% endif %}
|
||||
</button>
|
||||
</form>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
Loading…
Add table
Add a link
Reference in a new issue