forked from Proxmox/proxmox-perl-rs
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]
|
||||
fn api_unlock_tfa(#[try_from_ref] this: &Tfa, userid: &str) -> Result<bool, Error> {
|
||||
Ok(methods::unlock_tfa(
|
||||
fn api_unlock_tfa(#[raw] raw_this: Value, userid: &str) -> Result<bool, Error> {
|
||||
let this: &Tfa = (&raw_this).try_into()?;
|
||||
Ok(methods::unlock_and_reset_tfa(
|
||||
&mut this.inner.lock().unwrap(),
|
||||
&UserAccess::new(&raw_this)?,
|
||||
userid,
|
||||
)?)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user