mirror of
https://git.proxmox.com/git/proxmox-perl-rs
synced 2025-05-29 09:38:58 +00:00
pve: reset tfa failure count on unlock
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
parent
06f325fd9d
commit
5c6a27da1d
@ -487,9 +487,11 @@ mod export {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[export]
|
#[export]
|
||||||
fn api_unlock_tfa(#[try_from_ref] this: &Tfa, userid: &str) -> Result<bool, Error> {
|
fn api_unlock_tfa(#[raw] raw_this: Value, userid: &str) -> Result<bool, Error> {
|
||||||
Ok(methods::unlock_tfa(
|
let this: &Tfa = (&raw_this).try_into()?;
|
||||||
|
Ok(methods::unlock_and_reset_tfa(
|
||||||
&mut this.inner.lock().unwrap(),
|
&mut this.inner.lock().unwrap(),
|
||||||
|
&UserAccess::new(&raw_this)?,
|
||||||
userid,
|
userid,
|
||||||
)?)
|
)?)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user