From fecd70a7b2e828742d3e0d7d78012f307e7fb940 Mon Sep 17 00:00:00 2001 From: BlackDex Date: Wed, 7 Aug 2024 22:33:27 +0200 Subject: [PATCH] Prevent bulk remove collections to work --- src/api/core/organizations.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/api/core/organizations.rs b/src/api/core/organizations.rs index 85ea6d93b5..cbf029b55b 100644 --- a/src/api/core/organizations.rs +++ b/src/api/core/organizations.rs @@ -1640,7 +1640,7 @@ struct BulkCollectionsData { organization_id: String, cipher_ids: Vec, collection_ids: HashSet, - // remove_collections: Bool, // This is not used in v2024.6.3 a.t.m. + remove_collections: bool, } // This endpoint is only reachable via the organization view, therefor this endpoint is located here @@ -1649,6 +1649,12 @@ struct BulkCollectionsData { async fn post_bulk_collections(data: Json, headers: Headers, mut conn: DbConn) -> EmptyResult { let data: BulkCollectionsData = data.into_inner(); + // This feature does not seem to be active on all the clients + // To prevent future issues, add a check to block a call when this is set to true + if data.remove_collections { + err!("Bulk removing of collections is not yet implemented") + } + // Get all the collection available to the user in one query // Also filter based upon the provided collections let user_collections: HashMap =