fix: insert ApiAuthed into request extensions in no-auth mode (#11868)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Ruben Fiszel
2026-10-19 01:38:00 +02:00
committed by GitHub
co-authored by Claude Opus 5.5
parent 69d36f77da
commit a7561fd8bd
+4 -4
View File
@@ -1154,10 +1154,10 @@ pub async fn resolve_opt_job_authed(
};
if is_no_auth() {
return Ok((
OptJobAuthed { authed: no_auth_admin_authed(), job_id: None },
parts,
));
let authed = no_auth_admin_authed();
// Handlers taking `Extension<ApiAuthed>` read this insert, as on the token path.
parts.extensions.insert(authed.clone());
return Ok((OptJobAuthed { authed, job_id: None }, parts));
}
// Safe only while what the route checks below read is fixed before the first