From 8a1b1a95f32e33bae120906711e28d73b40ff487 Mon Sep 17 00:00:00 2001 From: Tamo Date: Thu, 23 Feb 2023 13:25:08 +0100 Subject: [PATCH] comment the right of the metrics --- meilisearch/src/routes/metrics.rs | 1 + meilisearch/tests/auth/authorization.rs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/meilisearch/src/routes/metrics.rs b/meilisearch/src/routes/metrics.rs index a06791b9e..1d3fb834e 100644 --- a/meilisearch/src/routes/metrics.rs +++ b/meilisearch/src/routes/metrics.rs @@ -22,6 +22,7 @@ pub async fn get_metrics( let response = create_all_stats( (*index_scheduler).clone(), (*auth_controller).clone(), + // we don't use the filters contained in the `ActionPolicy` because the metrics must have the right to access all the indexes. &AuthFilter::default(), )?; diff --git a/meilisearch/tests/auth/authorization.rs b/meilisearch/tests/auth/authorization.rs index 2c22a61b3..e92f41bcf 100644 --- a/meilisearch/tests/auth/authorization.rs +++ b/meilisearch/tests/auth/authorization.rs @@ -10,7 +10,7 @@ use crate::common::Server; pub static AUTHORIZATIONS: Lazy>> = Lazy::new(|| { - let mut authorizations = hashmap! { + let authorizations = hashmap! { ("POST", "/multi-search") => hashset!{"search", "*"}, ("POST", "/indexes/products/search") => hashset!{"search", "*"}, ("GET", "/indexes/products/search") => hashset!{"search", "*"},