comment the right of the metrics

This commit is contained in:
Tamo 2023-02-23 13:25:08 +01:00
parent 8d47d2d018
commit 8a1b1a95f3
2 changed files with 2 additions and 1 deletions

View File

@ -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(),
)?;

View File

@ -10,7 +10,7 @@ use crate::common::Server;
pub static AUTHORIZATIONS: Lazy<HashMap<(&'static str, &'static str), HashSet<&'static str>>> =
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", "*"},