From b8cea149c392bb05484c53dd4b48a9fa286e3d87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Cami?= Date: Wed, 17 Nov 2021 15:08:35 +0100 Subject: [PATCH] pwpolicy: change lifetime error message MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-By: Rob Crittenden Reviewed-By: Florence Blanc-Renaud --- ipaserver/plugins/pwpolicy.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ipaserver/plugins/pwpolicy.py b/ipaserver/plugins/pwpolicy.py index 9e20bb7a4..816faffe0 100644 --- a/ipaserver/plugins/pwpolicy.py +++ b/ipaserver/plugins/pwpolicy.py @@ -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):