mirror of
https://github.com/lldap/lldap.git
synced 2026-07-25 17:58:44 +00:00
chore: centralize and upgrade shared Cargo dependencies
Move duplicated Cargo dependencies to the root workspace manifest, switch member crates to workspace dependencies, and align non-conflicting shared feature sets at the workspace level. Upgrade a number of shared dependencies while consolidating versions across the workspace. This also consolidates the ldap3 dependency in response to GHSA-qcxq-75wr-5cm8: https://github.com/kanidm/ldap3/security/advisories/GHSA-qcxq-75wr-5cm8 Update frontend and migration code for dependency upgrades and clean up manifest structure.
This commit is contained in:
committed by
nitnelave
parent
b8465212b5
commit
40121b80b7
@@ -112,7 +112,7 @@ impl CommonComponent<CreateGroupForm> for CreateGroupForm {
|
||||
let model = self.form.model();
|
||||
let req = create_group::Variables {
|
||||
group: create_group::CreateGroupInput {
|
||||
displayName: model.groupname,
|
||||
display_name: model.groupname,
|
||||
attributes,
|
||||
},
|
||||
};
|
||||
|
||||
@@ -143,9 +143,9 @@ impl CommonComponent<CreateUserForm> for CreateUserForm {
|
||||
user: create_user::CreateUserInput {
|
||||
id: model.username,
|
||||
email: None,
|
||||
displayName: None,
|
||||
firstName: None,
|
||||
lastName: None,
|
||||
display_name: None,
|
||||
first_name: None,
|
||||
last_name: None,
|
||||
avatar: None,
|
||||
attributes,
|
||||
},
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
use std::{fmt::Display, str::FromStr};
|
||||
|
||||
use anyhow::{Error, Ok, Result, bail};
|
||||
use base64::Engine;
|
||||
use gloo_file::{
|
||||
File,
|
||||
callbacks::{FileReader, read_as_bytes},
|
||||
@@ -54,12 +55,12 @@ fn to_base64(file: &JsFile) -> Result<String> {
|
||||
if !is_valid_jpeg(data.as_slice()) {
|
||||
bail!("Chosen image is not a valid JPEG");
|
||||
}
|
||||
Ok(base64::encode(data))
|
||||
Ok(base64::engine::general_purpose::STANDARD.encode(data))
|
||||
}
|
||||
JsFile {
|
||||
file: None,
|
||||
contents: Some(data),
|
||||
} => Ok(base64::encode(data)),
|
||||
} => Ok(base64::engine::general_purpose::STANDARD.encode(data)),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -98,7 +99,7 @@ impl Component for JpegFileInput {
|
||||
.props()
|
||||
.value
|
||||
.as_ref()
|
||||
.and_then(|x| base64::decode(x).ok()),
|
||||
.and_then(|x| base64::engine::general_purpose::STANDARD.decode(x).ok()),
|
||||
}),
|
||||
reader: None,
|
||||
}
|
||||
@@ -111,7 +112,7 @@ impl Component for JpegFileInput {
|
||||
.props()
|
||||
.value
|
||||
.as_ref()
|
||||
.and_then(|x| base64::decode(x).ok()),
|
||||
.and_then(|x| base64::engine::general_purpose::STANDARD.decode(x).ok()),
|
||||
});
|
||||
self.reader = None;
|
||||
true
|
||||
@@ -230,7 +231,7 @@ impl JpegFileInput {
|
||||
}
|
||||
|
||||
fn is_valid_jpeg(bytes: &[u8]) -> bool {
|
||||
image::io::Reader::with_format(std::io::Cursor::new(bytes), image::ImageFormat::Jpeg)
|
||||
image::ImageReader::with_format(std::io::Cursor::new(bytes), image::ImageFormat::Jpeg)
|
||||
.decode()
|
||||
.is_ok()
|
||||
}
|
||||
|
||||
@@ -248,13 +248,13 @@ impl GroupDetailsForm {
|
||||
};
|
||||
let mut group_input = update_group::UpdateGroupInput {
|
||||
id: self.group.id,
|
||||
displayName: None,
|
||||
removeAttributes: None,
|
||||
insertAttributes: None,
|
||||
display_name: None,
|
||||
remove_attributes: None,
|
||||
insert_attributes: None,
|
||||
};
|
||||
let default_group_input = group_input.clone();
|
||||
group_input.removeAttributes = remove_attributes;
|
||||
group_input.insertAttributes = insert_attributes;
|
||||
group_input.remove_attributes = remove_attributes;
|
||||
group_input.insert_attributes = insert_attributes;
|
||||
// Nothing changed.
|
||||
if group_input == default_group_input {
|
||||
return Ok(false);
|
||||
|
||||
@@ -260,16 +260,16 @@ impl UserDetailsForm {
|
||||
let mut user_input = update_user::UpdateUserInput {
|
||||
id: self.user.id.clone(),
|
||||
email: None,
|
||||
displayName: None,
|
||||
firstName: None,
|
||||
lastName: None,
|
||||
display_name: None,
|
||||
first_name: None,
|
||||
last_name: None,
|
||||
avatar: None,
|
||||
removeAttributes: None,
|
||||
insertAttributes: None,
|
||||
remove_attributes: None,
|
||||
insert_attributes: None,
|
||||
};
|
||||
let default_user_input = user_input.clone();
|
||||
user_input.removeAttributes = remove_attributes;
|
||||
user_input.insertAttributes = insert_attributes;
|
||||
user_input.remove_attributes = remove_attributes;
|
||||
user_input.insert_attributes = insert_attributes;
|
||||
// Nothing changed.
|
||||
if user_input == default_user_input {
|
||||
return Ok(false);
|
||||
|
||||
Reference in New Issue
Block a user