Site Admin: user management #59

Closed
opened 2026-07-04 14:52:30 +02:00 by fable-5 · 1 comment
Collaborator

Context

Instance operators need basic user administration (support, abuse handling, GDPR groundwork).

Scope

Admin area 'Users': paginated searchable list (username, e-mail, status, created, last login, pond count), actions: disable/enable (disabled users cannot log in; sessions revoked), resend verification, delete user (two-step confirm; personal pond to trash, authored content pseudonymized per security.md — implement the pseudonymization service), grant/revoke Site Admin (not on self).

Acceptance criteria

  • disable logs the user out everywhere and blocks login with a distinct message
  • delete pseudonymizes authorship ('deleted user') and trashes the personal pond (fixture e2e)
  • self-demotion of the last site admin is prevented
  • every action audit-logged with actor

Technical notes

  • security.md §Privacy, ADR 0013 (pond trash).

Dependencies

Depends on #52.

Size: ~1.5 days


Conventions: English code/comments, clear human-readable code, no hard-coded UI strings (ADR 0012, add de and en), permission checks only via the shared guard (docs/architecture/permissions.md). Read the referenced ADRs before starting.

## Context Instance operators need basic user administration (support, abuse handling, GDPR groundwork). ## Scope Admin area 'Users': paginated searchable list (username, e-mail, status, created, last login, pond count), actions: disable/enable (disabled users cannot log in; sessions revoked), resend verification, delete user (two-step confirm; personal pond to trash, authored content pseudonymized per security.md — implement the pseudonymization service), grant/revoke Site Admin (not on self). ## Acceptance criteria - [ ] disable logs the user out everywhere and blocks login with a distinct message - [ ] delete pseudonymizes authorship ('deleted user') and trashes the personal pond (fixture e2e) - [ ] self-demotion of the last site admin is prevented - [ ] every action audit-logged with actor ## Technical notes - security.md §Privacy, ADR 0013 (pond trash). ## Dependencies Depends on #52. **Size**: ~1.5 days --- *Conventions: English code/comments, clear human-readable code, no hard-coded UI strings (ADR 0012, add `de` **and** `en`), permission checks only via the shared guard (docs/architecture/permissions.md). Read the referenced ADRs before starting.*
fable-5 added this to the M5 — Permissions & quotas milestone 2026-07-04 14:52:30 +02:00
fable-5 added the
backend
frontend
auth
labels 2026-07-04 14:52:30 +02:00
Collaborator

#59 verifiziert & abgeschlossen — User-Verwaltung + Pseudonymisierung.

Pipeline (ae8cdd0): alle 7 Kontexte grün — CI (Lint/Typecheck/Test, i18n:check), Auth-e2e-Pack (inkl. admin-users), Build → Deploy-Test → Smoke → Promote-Int.

Live auf Test + Int (GET /api/v1/admin/users):

  • Site-Admin (fixture-admin) → 200, liefert Nutzerliste (Test 3 / Int 6, mit Status, isSiteAdmin, pondCount, lastLoginAt).
  • Authentifizierter Nicht-Admin (collab-anna, Int) → 403 (SiteAdminGuard).
  • Anonym → 401.

Enthalten: Liste/Suche/Pagination, Disable/Enable, Bestätigungs-Mail erneut senden, Site-Admin-Flag setzen/entfernen, Löschen mit Pseudonymisierung (PseudonymizationService scrubbt PII → deleted-<id> / „Gelöschte Person", entfernt UserIdentity+Session, persönlicher Teich in Papierkorb). Guards: cannot_modify_self, last_site_admin. de/en-i18n mit Key-Parität (in ac48e9e repariert).

**#59 verifiziert & abgeschlossen** — User-Verwaltung + Pseudonymisierung. **Pipeline** (`ae8cdd0`): alle 7 Kontexte grün — CI (Lint/Typecheck/Test, i18n:check), Auth-e2e-Pack (inkl. `admin-users`), Build → Deploy-Test → Smoke → Promote-Int. **Live auf Test + Int** (`GET /api/v1/admin/users`): - Site-Admin (`fixture-admin`) → `200`, liefert Nutzerliste (Test 3 / Int 6, mit Status, `isSiteAdmin`, `pondCount`, `lastLoginAt`). - Authentifizierter Nicht-Admin (`collab-anna`, Int) → `403` (SiteAdminGuard). - Anonym → `401`. Enthalten: Liste/Suche/Pagination, Disable/Enable, Bestätigungs-Mail erneut senden, Site-Admin-Flag setzen/entfernen, Löschen mit Pseudonymisierung (`PseudonymizationService` scrubbt PII → `deleted-<id>` / „Gelöschte Person", entfernt `UserIdentity`+`Session`, persönlicher Teich in Papierkorb). Guards: `cannot_modify_self`, `last_site_admin`. de/en-i18n mit Key-Parität (in `ac48e9e` repariert).
Sign in to join this conversation.
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: stwaidele/dorfteich#59
No description provided.