2fc7f8ddd2
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.
34 lines
1.3 KiB
TOML
34 lines
1.3 KiB
TOML
# Generate a bcrypt hash for `web_password` e.g. via:
|
|
# python3 -c "import bcrypt; print(bcrypt.hashpw(b'your-password', bcrypt.gensalt()).decode())"
|
|
# or:
|
|
# htpasswd -bnBC 12 '' your-password | tr -d ':\n'
|
|
|
|
[[user]]
|
|
slug = "dr_mueller"
|
|
api_key = "change-me-to-a-secure-key"
|
|
web_password = "$2b$12$..."
|
|
role = "doctor"
|
|
# Optional: human-readable name shown in the web UI page header
|
|
# in place of the slug (the slug stays the on-disk directory and
|
|
# login identifier). Free-form UTF-8 — accents and spaces are fine.
|
|
# Defaults to the slug when omitted.
|
|
display_name = "Dr. Müller"
|
|
# Optional: how many visual lines of the LLM analysis preview the case
|
|
# list renders under each row. The preview itself is always the first
|
|
# paragraph of document.md; this value only caps the visible lines
|
|
# before truncation with "…". Defaults to 2 if omitted.
|
|
preview_lines = 2
|
|
# Optional per-user retention. Both fields default to 0 (feature
|
|
# disabled). auto_close_days = 7 + auto_delete_days = 30 means cases
|
|
# without new recordings auto-close after 7 days and are irreversibly
|
|
# removed 30 days later. Changes require a server restart.
|
|
[user.retention]
|
|
auto_close_days = 7
|
|
auto_delete_days = 30
|
|
|
|
[[user]]
|
|
slug = "dr_schmidt"
|
|
api_key = "change-me-to-a-secure-key"
|
|
web_password = "$2b$12$..."
|
|
role = "doctor"
|