mirror of
https://github.com/dani-garcia/vaultwarden.wiki.git
synced 2026-11-19 01:05:57 +02:00
Align policy enforcement and status codes with Bitwarden (#7970)
This commit is contained in:
6 files changed
+95
-41
No files matched your search
+1
-1
@@ -535,7 +535,7 @@ async fn remove_2fa(user_id: UserId, token: AdminToken, conn: DbConn) -> EmptyRe
|
||||
let mut user = get_user_or_404(&user_id, &conn).await?;
|
||||
TwoFactor::delete_all_by_user(&user.uuid, &conn).await?;
|
||||
Device::clear_twofactor_remember_by_user(&user.uuid, &conn).await?;
|
||||
two_factor::enforce_2fa_policy(&user, &ACTING_ADMIN_USER.into(), 14, &token.ip.ip, &conn).await?;
|
||||
two_factor::enforce_2fa_policy(&user, &ACTING_ADMIN_USER.into(), 14, &token.ip.ip, true, &conn).await?;
|
||||
user.totp_recover = None;
|
||||
user.save(&conn).await
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user