feat: Add admin flag to user and templates

Passes an `is_admin` flag to the `CaseRecordingsTemplate` and
`case_page.html`.
This flag determines whether the full case ID is displayed in the meta
section
for administrative users. It also influences the header display on the
case page
to prioritize the oneliner when available.
This commit is contained in:
2026-04-19 17:33:29 +02:00
parent b7e54db54c
commit 6369ff1680
4 changed files with 132 additions and 30 deletions
+3
View File
@@ -153,6 +153,7 @@ struct CaseRecordingsTemplate {
oneliner: Option<String>,
recordings: Vec<RecordingView>,
transcribe_busy: bool,
is_admin: bool,
}
/// Flags derived from filesystem state + config.
@@ -349,6 +350,7 @@ pub async fn handle_case_recordings(
let t_busy = pipeline.transcribe_busy.0.load(Ordering::Acquire);
let case_id_short = case_id_str.chars().take(8).collect();
let is_admin = user.is_admin();
CaseRecordingsTemplate {
slug: user.slug,
@@ -357,6 +359,7 @@ pub async fn handle_case_recordings(
oneliner,
recordings,
transcribe_busy: t_busy,
is_admin,
}
.render()
.map(Html)