0
0
Fork 0
mirror of https://github.com/dani-garcia/vaultwarden synced 2024-05-23 07:13:48 +02:00

Merge pull request #3427 from stefan0xC/check-if-policies-enabled

check if reset password policy is enabled
This commit is contained in:
Daniel García 2023-04-09 19:02:27 +02:00 committed by GitHub
commit 3bd4e42fb0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -309,7 +309,7 @@ impl OrgPolicy {
match OrgPolicy::find_by_org_and_type(org_uuid, OrgPolicyType::ResetPassword, conn).await {
Some(policy) => match serde_json::from_str::<UpCase<ResetPasswordDataModel>>(&policy.data) {
Ok(opts) => {
return opts.data.AutoEnrollEnabled;
return policy.enabled && opts.data.AutoEnrollEnabled;
}
_ => error!("Failed to deserialize ResetPasswordDataModel: {}", policy.data),
},