From f158e96fe7cb84ad1554bfe5f71a76d24341cdbf Mon Sep 17 00:00:00 2001 From: Tamo Date: Mon, 5 Feb 2024 14:14:13 +0100 Subject: [PATCH] fix the auth --- meilisearch/src/routes/logs.rs | 4 ++-- meilisearch/tests/auth/authorization.rs | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/meilisearch/src/routes/logs.rs b/meilisearch/src/routes/logs.rs index bca944d76..c22ca2129 100644 --- a/meilisearch/src/routes/logs.rs +++ b/meilisearch/src/routes/logs.rs @@ -213,7 +213,7 @@ fn entry_stream( } pub async fn get_logs( - index_scheduler: GuardedData, Data>, + index_scheduler: GuardedData, Data>, logs: Data, body: AwebJson, ) -> Result { @@ -245,7 +245,7 @@ pub async fn get_logs( } pub async fn cancel_logs( - index_scheduler: GuardedData, Data>, + index_scheduler: GuardedData, Data>, logs: Data, ) -> Result { index_scheduler.features().check_logs_route()?; diff --git a/meilisearch/tests/auth/authorization.rs b/meilisearch/tests/auth/authorization.rs index af028060d..88635e62f 100644 --- a/meilisearch/tests/auth/authorization.rs +++ b/meilisearch/tests/auth/authorization.rs @@ -59,6 +59,8 @@ pub static AUTHORIZATIONS: Lazy hashset!{"snapshots.create", "snapshots.*", "*"}, ("GET", "/version") => hashset!{"version", "*"}, ("GET", "/metrics") => hashset!{"metrics.get", "metrics.*", "*"}, + ("POST", "/logs") => hashset!{"metrics.get", "metrics.*", "*"}, + ("DELETE", "/logs") => hashset!{"metrics.get", "metrics.*", "*"}, ("PATCH", "/keys/mykey/") => hashset!{"keys.update", "*"}, ("GET", "/keys/mykey/") => hashset!{"keys.get", "*"}, ("DELETE", "/keys/mykey/") => hashset!{"keys.delete", "*"},