From 650da0414d6c6966e260cf17fc0a65342deef61c Mon Sep 17 00:00:00 2001 From: BlackDex Date: Wed, 28 Aug 2024 19:33:01 +0200 Subject: [PATCH] Removed some extra if checks Signed-off-by: BlackDex --- src/api/core/organizations.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/api/core/organizations.rs b/src/api/core/organizations.rs index 968e08fb..f1def030 100644 --- a/src/api/core/organizations.rs +++ b/src/api/core/organizations.rs @@ -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 {