Skip to content

Commit

Permalink
Prevent bulk remove collections to work
Browse files Browse the repository at this point in the history
  • Loading branch information
BlackDex committed Aug 7, 2024
1 parent 743c89a commit fecd70a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/api/core/organizations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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> =
Expand Down

0 comments on commit fecd70a

Please sign in to comment.