Browse Source

Prevent bulk remove collections to work

pull/4823/head
BlackDex 8 months ago
parent
commit
fecd70a7b2
No known key found for this signature in database GPG Key ID: 58C80A2AA6C765E1
  1. 8
      src/api/core/organizations.rs

8
src/api/core/organizations.rs

@ -1640,7 +1640,7 @@ struct BulkCollectionsData {
organization_id: String,
cipher_ids: Vec<String>,
collection_ids: HashSet<String>,
// 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<BulkCollectionsData>, 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<String, Collection> =

Loading…
Cancel
Save