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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user