Skip to content

Commit

Permalink
Removed some extra if checks
Browse files Browse the repository at this point in the history
Signed-off-by: BlackDex <black.dex@gmail.com>
  • Loading branch information
BlackDex committed Aug 28, 2024
1 parent 40be0a6 commit 650da04
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/api/core/organizations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1787,9 +1787,7 @@ async fn put_policy(
// Now that groups are available we can enforce this option when wanted.
// We put this behind a config option to prevent breaking current installation.
// Maybe we want to enable this by default in the future, but currently it is disabled by default.
if CONFIG.enforce_single_org_with_reset_pw_policy()
&& (pol_type_enum == OrgPolicyType::ResetPassword || pol_type_enum == OrgPolicyType::SingleOrg)
{
if CONFIG.enforce_single_org_with_reset_pw_policy() {
if pol_type_enum == OrgPolicyType::ResetPassword && data.enabled {
let single_org_policy_enabled =
match OrgPolicy::find_by_org_and_type(org_id, OrgPolicyType::SingleOrg, &mut conn).await {
Expand Down

0 comments on commit 650da04

Please sign in to comment.