Stefan Melmuk
4 days ago
No known key found for this signature in database
GPG Key ID: 817020C608FE9C09
3 changed files with
12 additions and
0 deletions
-
src/api/web.rs
-
src/config.rs
-
src/static/templates/scss/vaultwarden.scss.hbs
|
@ -64,6 +64,7 @@ fn vaultwarden_css() -> Cached<Css<String>> { |
|
|
"sso_enabled": CONFIG.sso_enabled(), |
|
|
"sso_enabled": CONFIG.sso_enabled(), |
|
|
"sso_only": CONFIG.sso_enabled() && CONFIG.sso_only(), |
|
|
"sso_only": CONFIG.sso_enabled() && CONFIG.sso_only(), |
|
|
"yubico_enabled": CONFIG._enable_yubico() && CONFIG.yubico_client_id().is_some() && CONFIG.yubico_secret_key().is_some(), |
|
|
"yubico_enabled": CONFIG._enable_yubico() && CONFIG.yubico_client_id().is_some() && CONFIG.yubico_secret_key().is_some(), |
|
|
|
|
|
"webauthn_2fa_supported": CONFIG.is_webauthn_2fa_supported(), |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
let scss = match CONFIG.render_template("scss/vaultwarden.scss", &css_options) { |
|
|
let scss = match CONFIG.render_template("scss/vaultwarden.scss", &css_options) { |
|
|
|
@ -1504,6 +1504,10 @@ impl Config { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
pub fn is_webauthn_2fa_supported(&self) -> bool { |
|
|
|
|
|
Url::parse(&self.domain()).expect("DOMAIN not a valid URL").domain().is_some() |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
/// Tests whether the admin token is set to a non-empty value.
|
|
|
/// Tests whether the admin token is set to a non-empty value.
|
|
|
pub fn is_admin_token_set(&self) -> bool { |
|
|
pub fn is_admin_token_set(&self) -> bool { |
|
|
let token = self.admin_token(); |
|
|
let token = self.admin_token(); |
|
|
|
@ -168,6 +168,13 @@ app-root a[routerlink="/signup"] { |
|
|
} |
|
|
} |
|
|
{{/unless}} |
|
|
{{/unless}} |
|
|
|
|
|
|
|
|
|
|
|
{{#unless webauthn_2fa_supported}} |
|
|
|
|
|
/* Hide `Passkey` 2FA if it is not supported */ |
|
|
|
|
|
.providers-2fa-7 { |
|
|
|
|
|
@extend %vw-hide; |
|
|
|
|
|
} |
|
|
|
|
|
{{/unless}} |
|
|
|
|
|
|
|
|
{{#unless emergency_access_allowed}} |
|
|
{{#unless emergency_access_allowed}} |
|
|
/* Hide Emergency Access if not allowed */ |
|
|
/* Hide Emergency Access if not allowed */ |
|
|
bit-nav-item[route="settings/emergency-access"] { |
|
|
bit-nav-item[route="settings/emergency-access"] { |
|
|