Spiegel von
https://github.com/dani-garcia/vaultwarden.git
synchronisiert 2024-11-25 05:40:29 +01:00
Merge pull request #3427 from stefan0xC/check-if-policies-enabled
check if reset password policy is enabled
Dieser Commit ist enthalten in:
Commit
3bd4e42fb0
1 geänderte Dateien mit 1 neuen und 1 gelöschten Zeilen
|
@ -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),
|
||||||
},
|
},
|
||||||
|
|
Laden …
In neuem Issue referenzieren