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", "*"},