mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2025-01-26 06:03:21 -05:00
check if reset policy is enabled
This commit is contained in:
parent
0b28ab3be1
commit
89e94b1d91
@ -309,7 +309,7 @@ impl OrgPolicy {
|
|||||||
match OrgPolicy::find_by_org_and_type(org_uuid, OrgPolicyType::ResetPassword, conn).await {
|
match OrgPolicy::find_by_org_and_type(org_uuid, OrgPolicyType::ResetPassword, conn).await {
|
||||||
Some(policy) => match serde_json::from_str::<UpCase<ResetPasswordDataModel>>(&policy.data) {
|
Some(policy) => match serde_json::from_str::<UpCase<ResetPasswordDataModel>>(&policy.data) {
|
||||||
Ok(opts) => {
|
Ok(opts) => {
|
||||||
return opts.data.AutoEnrollEnabled;
|
return policy.enabled && opts.data.AutoEnrollEnabled;
|
||||||
}
|
}
|
||||||
_ => error!("Failed to deserialize ResetPasswordDataModel: {}", policy.data),
|
_ => error!("Failed to deserialize ResetPasswordDataModel: {}", policy.data),
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user