fmt: fmt and clippy

This commit is contained in:
silver 2023-07-17 00:14:48 +01:00
parent b9bcd5352e
commit 6374b44e08
3 changed files with 32 additions and 45 deletions

View file

@ -296,7 +296,7 @@ async fn account_verification_new_account(ldap: &mut LdapConn, user_details: &Ac
// need to get this from wolves
//("skID", HashSet::from(["12345678"])),
("skCreated", HashSet::from([sk_created.as_str()])),
// 1 = secure, automatic since its a new account
// 1 = secure, automatic since its a new account
("skSecure", HashSet::from(["1"])),
],
)?

View file

@ -54,12 +54,12 @@ pub async fn post_update_ldap(mut req: Request<State>) -> tide::Result {
// main value we are updating
Mod::Replace(field, HashSet::from([value])),
];
// if teh password is changing then its inherentrly secure, same if its currently an empty field
if !pw_keep_same || !pw_secure {
mods.push(Mod::Replace(String::from("skSecure"), HashSet::from([String::from("1")])));
}
ldap.modify(&dn, mods)?.success()?;
// pass back the "old" and "new" passwords