1
0
Fork 0
mirror of https://github.com/dani-garcia/vaultwarden.git synced 2025-06-21 19:00:08 +00:00

automatically use email address as 2fa provider (#4317)

This commit is contained in:
Stefan Melmuk 2024-03-17 22:35:02 +01:00 committed by GitHub
parent 7c3cad197c
commit 79ce5b49bc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 90 additions and 12 deletions

View file

@ -340,4 +340,11 @@ impl OrgPolicy {
}
false
}
pub async fn is_enabled_by_org(org_uuid: &str, policy_type: OrgPolicyType, conn: &mut DbConn) -> bool {
if let Some(policy) = OrgPolicy::find_by_org_and_type(org_uuid, policy_type, conn).await {
return policy.enabled;
}
false
}
}