fmt: fmt and clippy
This commit is contained in:
parent
b9bcd5352e
commit
6374b44e08
3 changed files with 32 additions and 45 deletions
|
@ -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"])),
|
||||
],
|
||||
)?
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue