From 4fd22d8e3b47fcbca616b465cc02a60034d32d24 Mon Sep 17 00:00:00 2001 From: Stefan Melmuk <509385+stefan0xC@users.noreply.github.com> Date: Wed, 9 Jul 2025 23:25:11 +0200 Subject: [PATCH] fix hiding email as 2fa provider (#6026) --- src/api/web.rs | 1 + src/static/templates/scss/vaultwarden.scss.hbs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/api/web.rs b/src/api/web.rs index d9d13b13..c4faf58c 100644 --- a/src/api/web.rs +++ b/src/api/web.rs @@ -57,6 +57,7 @@ fn vaultwarden_css() -> Cached> { let css_options = json!({ "signup_disabled": !CONFIG.signups_allowed() && CONFIG.signups_domains_whitelist().is_empty(), "mail_enabled": CONFIG.mail_enabled(), + "mail_2fa_enabled": CONFIG._enable_email_2fa(), "yubico_enabled": CONFIG._enable_yubico() && CONFIG.yubico_client_id().is_some() && CONFIG.yubico_secret_key().is_some(), "emergency_access_allowed": CONFIG.emergency_access_allowed(), "sends_allowed": CONFIG.sends_allowed(), diff --git a/src/static/templates/scss/vaultwarden.scss.hbs b/src/static/templates/scss/vaultwarden.scss.hbs index 9caa1315..c017e265 100644 --- a/src/static/templates/scss/vaultwarden.scss.hbs +++ b/src/static/templates/scss/vaultwarden.scss.hbs @@ -118,7 +118,7 @@ app-root a[routerlink="/signup"] { {{/if}} {{/if}} -{{#unless mail_enabled}} +{{#unless mail_2fa_enabled}} /* Hide `Email` 2FA if mail is not enabled */ .providers-2fa-1 { @extend %vw-hide;