mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-10-19 16:03:29 +00:00
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:
co-authored by
Claude Opus 5.5
parent
69d36f77da
commit
a7561fd8bd
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user