feat: Add display name to user profiles

Introduce `display_name` field to `User` struct for human-readable names
in the UI.
This falls back to the user's `slug` if not provided.

Update `AuthenticatedWebUser` and `MyCasesTemplate` to use this new
field for rendering.
Add tests for parsing `display_name` and ensure fallback logic works
correctly.
Update `users.toml.example` to document the new field.
This commit is contained in:
2026-05-04 11:46:19 +02:00
parent 03129ad592
commit 2fc7f8ddd2
6 changed files with 97 additions and 24 deletions
+1
View File
@@ -33,6 +33,7 @@ pub fn test_user(slug: &str) -> User {
api_key: format!("key-{slug}"),
web_password: hash_password(TEST_PASSWORD),
role: "doctor".into(),
display_name: None,
language: None,
retention: Default::default(),
window_hours: 72,