fix: require wider jwt for changing the io engine (#6770)

io-engine should not be changeable with any JWT token, for example the
tenant_id scoped token which computes have.
This commit is contained in:
Joonas Koivunen
2024-02-15 18:58:26 +02:00
committed by GitHub
parent c72cb44213
commit 046d9c69e6

View File

@@ -1951,6 +1951,7 @@ async fn put_io_engine_handler(
mut r: Request<Body>,
_cancel: CancellationToken,
) -> Result<Response<Body>, ApiError> {
check_permission(&r, None)?;
let kind: crate::virtual_file::IoEngineKind = json_request(&mut r).await?;
crate::virtual_file::io_engine::set(kind);
json_response(StatusCode::OK, ())