mirror of
https://github.com/dani-garcia/vaultwarden.wiki.git
synced 2026-09-17 14:16:21 +03:00
Fix organization import failing with missing field groups (#7699)
This commit is contained in:
@@ -132,7 +132,6 @@ struct FullCollectionData {
|
|||||||
name: String,
|
name: String,
|
||||||
groups: Vec<CollectionGroupData>,
|
groups: Vec<CollectionGroupData>,
|
||||||
users: Vec<CollectionMembershipData>,
|
users: Vec<CollectionMembershipData>,
|
||||||
id: Option<CollectionId>,
|
|
||||||
external_id: Option<String>,
|
external_id: Option<String>,
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1793,11 +1792,22 @@ async fn bulk_public_keys(
|
|||||||
use super::ciphers::CipherData;
|
use super::ciphers::CipherData;
|
||||||
use super::ciphers::update_cipher_from_data;
|
use super::ciphers::update_cipher_from_data;
|
||||||
|
|
||||||
|
// The import endpoint only ever uses the name/id/external_id of a collection.
|
||||||
|
// Bitwarden's own server ignores `groups`/`users` here too, so do not make them
|
||||||
|
// mandatory: clients are free to leave them out.
|
||||||
|
#[derive(Deserialize)]
|
||||||
|
#[serde(rename_all = "camelCase")]
|
||||||
|
struct ImportCollectionData {
|
||||||
|
name: String,
|
||||||
|
id: Option<CollectionId>,
|
||||||
|
external_id: Option<String>,
|
||||||
|
}
|
||||||
|
|
||||||
#[derive(Deserialize)]
|
#[derive(Deserialize)]
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
struct ImportData {
|
struct ImportData {
|
||||||
ciphers: Vec<CipherData>,
|
ciphers: Vec<CipherData>,
|
||||||
collections: Vec<FullCollectionData>,
|
collections: Vec<ImportCollectionData>,
|
||||||
collection_relationships: Vec<RelationsData>,
|
collection_relationships: Vec<RelationsData>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user