From be1c6f9dc47b82b16a335334e710e2d01c214f65 Mon Sep 17 00:00:00 2001 From: Phillip Davis Date: Mon, 4 Jul 2022 21:30:24 -0400 Subject: [PATCH] Update tests to include .* permissions for tasks, indexes, dumps, stats, and settings --- meilisearch-http/tests/auth/authorization.rs | 62 ++++++++++---------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/meilisearch-http/tests/auth/authorization.rs b/meilisearch-http/tests/auth/authorization.rs index e790d1e4a..27a22de38 100644 --- a/meilisearch-http/tests/auth/authorization.rs +++ b/meilisearch-http/tests/auth/authorization.rs @@ -15,37 +15,37 @@ pub static AUTHORIZATIONS: Lazy hashset!{"documents.get", "documents.*", "*"}, ("GET", "/indexes/products/documents/0") => hashset!{"documents.get", "documents.*", "*"}, ("DELETE", "/indexes/products/documents/0") => hashset!{"documents.delete", "documents.*", "*"}, - ("GET", "/tasks") => hashset!{"tasks.get", "*"}, - ("GET", "/tasks?indexUid=products") => hashset!{"tasks.get", "*"}, - ("GET", "/tasks/0") => hashset!{"tasks.get", "*"}, - ("PATCH", "/indexes/products/") => hashset!{"indexes.update", "*"}, - ("GET", "/indexes/products/") => hashset!{"indexes.get", "*"}, - ("DELETE", "/indexes/products/") => hashset!{"indexes.delete", "*"}, - ("POST", "/indexes") => hashset!{"indexes.create", "*"}, - ("GET", "/indexes") => hashset!{"indexes.get", "*"}, - ("GET", "/indexes/products/settings") => hashset!{"settings.get", "*"}, - ("GET", "/indexes/products/settings/displayed-attributes") => hashset!{"settings.get", "*"}, - ("GET", "/indexes/products/settings/distinct-attribute") => hashset!{"settings.get", "*"}, - ("GET", "/indexes/products/settings/filterable-attributes") => hashset!{"settings.get", "*"}, - ("GET", "/indexes/products/settings/ranking-rules") => hashset!{"settings.get", "*"}, - ("GET", "/indexes/products/settings/searchable-attributes") => hashset!{"settings.get", "*"}, - ("GET", "/indexes/products/settings/sortable-attributes") => hashset!{"settings.get", "*"}, - ("GET", "/indexes/products/settings/stop-words") => hashset!{"settings.get", "*"}, - ("GET", "/indexes/products/settings/synonyms") => hashset!{"settings.get", "*"}, - ("DELETE", "/indexes/products/settings") => hashset!{"settings.update", "*"}, - ("PATCH", "/indexes/products/settings") => hashset!{"settings.update", "*"}, - ("PATCH", "/indexes/products/settings/typo-tolerance") => hashset!{"settings.update", "*"}, - ("PUT", "/indexes/products/settings/displayed-attributes") => hashset!{"settings.update", "*"}, - ("PUT", "/indexes/products/settings/distinct-attribute") => hashset!{"settings.update", "*"}, - ("PUT", "/indexes/products/settings/filterable-attributes") => hashset!{"settings.update", "*"}, - ("PUT", "/indexes/products/settings/ranking-rules") => hashset!{"settings.update", "*"}, - ("PUT", "/indexes/products/settings/searchable-attributes") => hashset!{"settings.update", "*"}, - ("PUT", "/indexes/products/settings/sortable-attributes") => hashset!{"settings.update", "*"}, - ("PUT", "/indexes/products/settings/stop-words") => hashset!{"settings.update", "*"}, - ("PUT", "/indexes/products/settings/synonyms") => hashset!{"settings.update", "*"}, - ("GET", "/indexes/products/stats") => hashset!{"stats.get", "*"}, - ("GET", "/stats") => hashset!{"stats.get", "*"}, - ("POST", "/dumps") => hashset!{"dumps.create", "*"}, + ("GET", "/tasks") => hashset!{"tasks.get", "tasks.*", "*"}, + ("GET", "/tasks?indexUid=products") => hashset!{"tasks.get", "tasks.*", "*"}, + ("GET", "/tasks/0") => hashset!{"tasks.get", "tasks.*", "*"}, + ("PATCH", "/indexes/products/") => hashset!{"indexes.update", "indexes.*", "*"}, + ("GET", "/indexes/products/") => hashset!{"indexes.get", "indexes.*", "*"}, + ("DELETE", "/indexes/products/") => hashset!{"indexes.delete", "indexes.*", "*"}, + ("POST", "/indexes") => hashset!{"indexes.create", "indexes.*", "*"}, + ("GET", "/indexes") => hashset!{"indexes.get", "indexes.*", "*"}, + ("GET", "/indexes/products/settings") => hashset!{"settings.get", "settings.*", "*"}, + ("GET", "/indexes/products/settings/displayed-attributes") => hashset!{"settings.get", "settings.*", "*"}, + ("GET", "/indexes/products/settings/distinct-attribute") => hashset!{"settings.get", "settings.*", "*"}, + ("GET", "/indexes/products/settings/filterable-attributes") => hashset!{"settings.get", "settings.*", "*"}, + ("GET", "/indexes/products/settings/ranking-rules") => hashset!{"settings.get", "settings.*", "*"}, + ("GET", "/indexes/products/settings/searchable-attributes") => hashset!{"settings.get", "settings.*", "*"}, + ("GET", "/indexes/products/settings/sortable-attributes") => hashset!{"settings.get", "settings.*", "*"}, + ("GET", "/indexes/products/settings/stop-words") => hashset!{"settings.get", "settings.*", "*"}, + ("GET", "/indexes/products/settings/synonyms") => hashset!{"settings.get", "settings.*", "*"}, + ("DELETE", "/indexes/products/settings") => hashset!{"settings.update", "settings.*", "*"}, + ("PATCH", "/indexes/products/settings") => hashset!{"settings.update", "settings.*", "*"}, + ("PATCH", "/indexes/products/settings/typo-tolerance") => hashset!{"settings.update", "settings.*", "*"}, + ("PUT", "/indexes/products/settings/displayed-attributes") => hashset!{"settings.update", "settings.*", "*"}, + ("PUT", "/indexes/products/settings/distinct-attribute") => hashset!{"settings.update", "settings.*", "*"}, + ("PUT", "/indexes/products/settings/filterable-attributes") => hashset!{"settings.update", "settings.*", "*"}, + ("PUT", "/indexes/products/settings/ranking-rules") => hashset!{"settings.update", "settings.*", "*"}, + ("PUT", "/indexes/products/settings/searchable-attributes") => hashset!{"settings.update", "settings.*", "*"}, + ("PUT", "/indexes/products/settings/sortable-attributes") => hashset!{"settings.update", "settings.*", "*"}, + ("PUT", "/indexes/products/settings/stop-words") => hashset!{"settings.update", "settings.*", "*"}, + ("PUT", "/indexes/products/settings/synonyms") => hashset!{"settings.update", "settings.*", "*"}, + ("GET", "/indexes/products/stats") => hashset!{"stats.get", "stats.*", "*"}, + ("GET", "/stats") => hashset!{"stats.get", "stats.*", "*"}, + ("POST", "/dumps") => hashset!{"dumps.create", "dumps.*", "*"}, ("GET", "/version") => hashset!{"version", "*"}, ("PATCH", "/keys/mykey/") => hashset!{"keys.update", "*"}, ("GET", "/keys/mykey/") => hashset!{"keys.get", "*"},