pwpolicy: change lifetime error message

ipa pwpolicy-mod --minlife $min --maxlife $max
accepts $max >= $min, yet the error message says:
"Maximum password life must be greater than minimum."

Change the error message so that it conveys the
actual logic.

Fixes: https://pagure.io/freeipa/issue/9038
Signed-off-by: François Cami <fcami@redhat.com>
Reviewed-By: Florence Blanc-Renaud <flo@redhat.com>
Reviewed-By: Rob Crittenden <rcritten@redhat.com>
This commit is contained in:
François Cami authored and Florence Blanc-Renaud committed 2021-11-22 12:35:55 +01:00
1 parent bb5ef71607
commit 76afa643f4
1 file changed
+4 -1
+4 -1
View File
@@ -491,7 +491,10 @@ class pwpolicy(LDAPObject):
if minlife > maxlife:
raise errors.ValidationError(
name='maxlife',
error=_('Maximum password life must be greater than minimum.'),
error=_(
"Maximum password life must be equal to "
"or greater than the minimum."
),
)
def add_cospriority(self, entry, pwpolicy_name, rights=True):