Merge pull request #1078 from rjeffman/ipapwpolicy_simple_attribute_test

ipapwpolicy: simplified and faster attribute verification
This commit is contained in:
Thomas Woerner
2023-06-07 17:12:36 +02:00
committed by GitHub

View File

@@ -230,17 +230,15 @@ def check_supported_params(
"pwpolicy_add", "passwordgracelimit") "pwpolicy_add", "passwordgracelimit")
# If needed, report unsupported password checking paramteres # If needed, report unsupported password checking paramteres
if not has_password_check: if (
check_password_params = [maxrepeat, maxsequence, dictcheck, usercheck] not has_password_check
unsupported = [ and any([maxrepeat, maxsequence, dictcheck, usercheck])
x for x in check_password_params if x is not None ):
] module.fail_json(
if unsupported: msg="Your IPA version does not support arguments: "
module.fail_json( "maxrepeat, maxsequence, dictcheck, usercheck.")
msg="Your IPA version does not support arguments: "
"maxrepeat, maxsequence, dictcheck, usercheck.")
if gracelimit is not None and not has_gracelimit: if not has_gracelimit and gracelimit is not None:
module.fail_json( module.fail_json(
msg="Your IPA version does not support 'gracelimit'.") msg="Your IPA version does not support 'gracelimit'.")