From 3b01ed4fe82488ff3a921301051d334a1476cb50 Mon Sep 17 00:00:00 2001 From: ManyTheFish Date: Tue, 7 Jun 2022 10:49:28 +0200 Subject: [PATCH] feat(auth): remove `dumps.get` action from keys --- meilisearch-auth/src/action.rs | 5 ----- meilisearch-http/tests/auth/api_keys.rs | 20 -------------------- 2 files changed, 25 deletions(-) diff --git a/meilisearch-auth/src/action.rs b/meilisearch-auth/src/action.rs index 088ad6ba7..fab5263ec 100644 --- a/meilisearch-auth/src/action.rs +++ b/meilisearch-auth/src/action.rs @@ -32,8 +32,6 @@ pub enum Action { StatsGet = actions::STATS_GET, #[serde(rename = "dumps.create")] DumpsCreate = actions::DUMPS_CREATE, - #[serde(rename = "dumps.get")] - DumpsGet = actions::DUMPS_GET, #[serde(rename = "version")] Version = actions::VERSION, #[serde(rename = "keys.create")] @@ -64,7 +62,6 @@ impl Action { SETTINGS_UPDATE => Some(Self::SettingsUpdate), STATS_GET => Some(Self::StatsGet), DUMPS_CREATE => Some(Self::DumpsCreate), - DUMPS_GET => Some(Self::DumpsGet), VERSION => Some(Self::Version), KEYS_CREATE => Some(Self::KeysAdd), KEYS_GET => Some(Self::KeysGet), @@ -91,7 +88,6 @@ impl Action { Self::SettingsUpdate => SETTINGS_UPDATE, Self::StatsGet => STATS_GET, Self::DumpsCreate => DUMPS_CREATE, - Self::DumpsGet => DUMPS_GET, Self::Version => VERSION, Self::KeysAdd => KEYS_CREATE, Self::KeysGet => KEYS_GET, @@ -116,7 +112,6 @@ pub mod actions { pub const SETTINGS_UPDATE: u8 = 11; pub const STATS_GET: u8 = 12; pub const DUMPS_CREATE: u8 = 13; - pub const DUMPS_GET: u8 = 14; pub const VERSION: u8 = 15; pub const KEYS_CREATE: u8 = 16; pub const KEYS_GET: u8 = 17; diff --git a/meilisearch-http/tests/auth/api_keys.rs b/meilisearch-http/tests/auth/api_keys.rs index d7e7dad0f..9ba583b07 100644 --- a/meilisearch-http/tests/auth/api_keys.rs +++ b/meilisearch-http/tests/auth/api_keys.rs @@ -27,7 +27,6 @@ async fn add_valid_api_key() { "settings.update", "stats.get", "dumps.create", - "dumps.get" ], "expiresAt": "2050-11-13T00:00:00Z" }); @@ -58,7 +57,6 @@ async fn add_valid_api_key() { "settings.update", "stats.get", "dumps.create", - "dumps.get" ], "expiresAt": "2050-11-13T00:00:00Z" }); @@ -88,7 +86,6 @@ async fn add_valid_api_key_expired_at() { "settings.update", "stats.get", "dumps.create", - "dumps.get" ], "expiresAt": "2050-11-13" }); @@ -117,7 +114,6 @@ async fn add_valid_api_key_expired_at() { "settings.update", "stats.get", "dumps.create", - "dumps.get" ], "expiresAt": "2050-11-13T00:00:00Z" }); @@ -532,7 +528,6 @@ async fn get_api_key() { "settings.update", "stats.get", "dumps.create", - "dumps.get" ], "expiresAt": "2050-11-13T00:00:00Z" }); @@ -562,7 +557,6 @@ async fn get_api_key() { "settings.update", "stats.get", "dumps.create", - "dumps.get" ], "expiresAt": "2050-11-13T00:00:00Z" }); @@ -667,7 +661,6 @@ async fn list_api_keys() { "settings.update", "stats.get", "dumps.create", - "dumps.get" ], "expiresAt": "2050-11-13T00:00:00Z" }); @@ -698,7 +691,6 @@ async fn list_api_keys() { "settings.update", "stats.get", "dumps.create", - "dumps.get" ], "expiresAt": "2050-11-13T00:00:00Z" }, @@ -778,7 +770,6 @@ async fn delete_api_key() { "settings.update", "stats.get", "dumps.create", - "dumps.get" ], "expiresAt": "2050-11-13T00:00:00Z" }); @@ -875,7 +866,6 @@ async fn patch_api_key_description() { "indexes.delete", "stats.get", "dumps.create", - "dumps.get" ], "expiresAt": "2050-11-13T00:00:00Z" }); @@ -917,7 +907,6 @@ async fn patch_api_key_description() { "indexes.delete", "stats.get", "dumps.create", - "dumps.get" ], "expiresAt": "2050-11-13T00:00:00Z" }); @@ -947,7 +936,6 @@ async fn patch_api_key_description() { "indexes.delete", "stats.get", "dumps.create", - "dumps.get" ], "expiresAt": "2050-11-13T00:00:00Z" }); @@ -976,7 +964,6 @@ async fn patch_api_key_description() { "indexes.delete", "stats.get", "dumps.create", - "dumps.get" ], "expiresAt": "2050-11-13T00:00:00Z" }); @@ -1002,7 +989,6 @@ async fn patch_api_key_name() { "indexes.delete", "stats.get", "dumps.create", - "dumps.get" ], "expiresAt": "2050-11-13T00:00:00Z" }); @@ -1044,7 +1030,6 @@ async fn patch_api_key_name() { "indexes.delete", "stats.get", "dumps.create", - "dumps.get" ], "expiresAt": "2050-11-13T00:00:00Z" }); @@ -1074,7 +1059,6 @@ async fn patch_api_key_name() { "indexes.delete", "stats.get", "dumps.create", - "dumps.get" ], "expiresAt": "2050-11-13T00:00:00Z" }); @@ -1103,7 +1087,6 @@ async fn patch_api_key_name() { "indexes.delete", "stats.get", "dumps.create", - "dumps.get" ], "expiresAt": "2050-11-13T00:00:00Z" }); @@ -1130,7 +1113,6 @@ async fn error_patch_api_key_indexes() { "indexes.delete", "stats.get", "dumps.create", - "dumps.get" ], "expiresAt": "2050-11-13T00:00:00Z" }); @@ -1178,7 +1160,6 @@ async fn error_patch_api_key_actions() { "indexes.delete", "stats.get", "dumps.create", - "dumps.get" ], "expiresAt": "2050-11-13T00:00:00Z" }); @@ -1234,7 +1215,6 @@ async fn error_patch_api_key_expiration_date() { "indexes.delete", "stats.get", "dumps.create", - "dumps.get" ], "expiresAt": "2050-11-13T00:00:00Z" });