mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-11-25 22:34:28 +01:00
fix the auth
This commit is contained in:
parent
e23ec4886d
commit
f158e96fe7
@ -213,7 +213,7 @@ fn entry_stream(
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub async fn get_logs(
|
pub async fn get_logs(
|
||||||
index_scheduler: GuardedData<ActionPolicy<{ actions::METRICS_ALL }>, Data<IndexScheduler>>,
|
index_scheduler: GuardedData<ActionPolicy<{ actions::METRICS_GET }>, Data<IndexScheduler>>,
|
||||||
logs: Data<LogRouteHandle>,
|
logs: Data<LogRouteHandle>,
|
||||||
body: AwebJson<GetLogs, DeserrJsonError>,
|
body: AwebJson<GetLogs, DeserrJsonError>,
|
||||||
) -> Result<HttpResponse, ResponseError> {
|
) -> Result<HttpResponse, ResponseError> {
|
||||||
@ -245,7 +245,7 @@ pub async fn get_logs(
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub async fn cancel_logs(
|
pub async fn cancel_logs(
|
||||||
index_scheduler: GuardedData<ActionPolicy<{ actions::METRICS_ALL }>, Data<IndexScheduler>>,
|
index_scheduler: GuardedData<ActionPolicy<{ actions::METRICS_GET }>, Data<IndexScheduler>>,
|
||||||
logs: Data<LogRouteHandle>,
|
logs: Data<LogRouteHandle>,
|
||||||
) -> Result<HttpResponse, ResponseError> {
|
) -> Result<HttpResponse, ResponseError> {
|
||||||
index_scheduler.features().check_logs_route()?;
|
index_scheduler.features().check_logs_route()?;
|
||||||
|
@ -59,6 +59,8 @@ pub static AUTHORIZATIONS: Lazy<HashMap<(&'static str, &'static str), HashSet<&'
|
|||||||
("POST", "/snapshots") => hashset!{"snapshots.create", "snapshots.*", "*"},
|
("POST", "/snapshots") => hashset!{"snapshots.create", "snapshots.*", "*"},
|
||||||
("GET", "/version") => hashset!{"version", "*"},
|
("GET", "/version") => hashset!{"version", "*"},
|
||||||
("GET", "/metrics") => hashset!{"metrics.get", "metrics.*", "*"},
|
("GET", "/metrics") => hashset!{"metrics.get", "metrics.*", "*"},
|
||||||
|
("POST", "/logs") => hashset!{"metrics.get", "metrics.*", "*"},
|
||||||
|
("DELETE", "/logs") => hashset!{"metrics.get", "metrics.*", "*"},
|
||||||
("PATCH", "/keys/mykey/") => hashset!{"keys.update", "*"},
|
("PATCH", "/keys/mykey/") => hashset!{"keys.update", "*"},
|
||||||
("GET", "/keys/mykey/") => hashset!{"keys.get", "*"},
|
("GET", "/keys/mykey/") => hashset!{"keys.get", "*"},
|
||||||
("DELETE", "/keys/mykey/") => hashset!{"keys.delete", "*"},
|
("DELETE", "/keys/mykey/") => hashset!{"keys.delete", "*"},
|
||||||
|
Loading…
Reference in New Issue
Block a user