SCIM Sync Missing Annotation (#3300)

A missing serde annotion in SCIM Sync caused groups to fail to
sync unless they had a description. This resolves the failure
by adding the correct annotation to skip None fields in groups.
This commit is contained in:
Firstyear 2024-12-17 14:18:30 +10:00 committed by GitHub
parent eba8dff23a
commit 0b2f349aec
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 3 additions and 2 deletions

View file

@ -220,6 +220,7 @@ pub struct ScimExternalMember {
pub external_id: String, pub external_id: String,
} }
#[skip_serializing_none]
#[derive(Serialize, Deserialize, Debug, Clone)] #[derive(Serialize, Deserialize, Debug, Clone)]
#[serde(rename_all = "snake_case")] #[serde(rename_all = "snake_case")]
pub struct ScimSyncGroup { pub struct ScimSyncGroup {

View file

@ -942,7 +942,7 @@ fn ipa_to_scim_entry(
.build(); .build();
let scim_entry_generic: ScimEntry = scim_sync_person.try_into().map_err(|json_err| { let scim_entry_generic: ScimEntry = scim_sync_person.try_into().map_err(|json_err| {
error!(?json_err, "Unable to convert group to scim_sync_group"); error!(?json_err, "Unable to convert person to scim_sync_person");
})?; })?;
Ok(Some(scim_entry_generic)) Ok(Some(scim_entry_generic))

View file

@ -633,7 +633,7 @@ fn ldap_to_scim_entry(
.build(); .build();
let scim_entry_generic: ScimEntry = scim_sync_person.try_into().map_err(|json_err| { let scim_entry_generic: ScimEntry = scim_sync_person.try_into().map_err(|json_err| {
error!(?json_err, "Unable to convert group to scim_sync_group"); error!(?json_err, "Unable to convert person to scim_sync_person");
})?; })?;
Ok(Some(scim_entry_generic)) Ok(Some(scim_entry_generic))