mirror of
https://git.proxmox.com/git/proxmox-backup
synced 2025-08-03 13:23:52 +00:00
properly scope clippy allow
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
This commit is contained in:
parent
d2ff521df2
commit
75ecc27907
@ -106,7 +106,9 @@ fn authenticate_user(
|
||||
}
|
||||
|
||||
#[allow(clippy::let_unit_value)]
|
||||
let _: () = crate::auth::authenticate_user(userid, password)?;
|
||||
{
|
||||
let _: () = crate::auth::authenticate_user(userid, password)?;
|
||||
}
|
||||
|
||||
Ok(match crate::config::tfa::login_challenge(userid)? {
|
||||
None => AuthResult::CreateTicket,
|
||||
@ -124,7 +126,9 @@ fn authenticate_2nd(
|
||||
.require_partial()?;
|
||||
|
||||
#[allow(clippy::let_unit_value)]
|
||||
let _: () = crate::config::tfa::verify_challenge(userid, &challenge, response.parse()?)?;
|
||||
{
|
||||
let _: () = crate::config::tfa::verify_challenge(userid, &challenge, response.parse()?)?;
|
||||
}
|
||||
|
||||
Ok(AuthResult::CreateTicket)
|
||||
}
|
||||
|
@ -30,8 +30,10 @@ fn tfa_update_auth(
|
||||
if authid.user() != Userid::root_userid() {
|
||||
let password = password.ok_or_else(|| http_err!(UNAUTHORIZED, "missing password"))?;
|
||||
#[allow(clippy::let_unit_value)]
|
||||
let _: () = crate::auth::authenticate_user(authid.user(), &password)
|
||||
.map_err(|err| http_err!(UNAUTHORIZED, "{}", err))?;
|
||||
{
|
||||
let _: () = crate::auth::authenticate_user(authid.user(), &password)
|
||||
.map_err(|err| http_err!(UNAUTHORIZED, "{}", err))?;
|
||||
}
|
||||
}
|
||||
|
||||
// After authentication, verify that the to-be-modified user actually exists:
|
||||
|
Loading…
Reference in New Issue
Block a user