URL: https://github.com/freeipa/freeipa/pull/6099 Author: fcami Title: #6099: [Backport][ipa-4-9] pwpolicy: change lifetime error message Action: opened
PR body: """ This PR was opened automatically because PR #6086 was pushed to master and backport to ipa-4-9 is required. """ To pull the PR as Git branch: git remote add ghfreeipa https://github.com/freeipa/freeipa git fetch ghfreeipa pull/6099/head:pr6099 git checkout pr6099
From e3e28bf680ec50e1ea538c4e3bbca9a2a5e2962f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Cami?= <fc...@redhat.com> 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 <fc...@redhat.com> --- 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 9e20bb7a4dc..816faffe0f9 100644 --- a/ipaserver/plugins/pwpolicy.py +++ b/ipaserver/plugins/pwpolicy.py @@ -491,7 +491,10 @@ def validate_lifetime(self, entry_attrs, add=False, *keys): 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):
_______________________________________________ FreeIPA-devel mailing list -- freeipa-devel@lists.fedorahosted.org To unsubscribe send an email to freeipa-devel-le...@lists.fedorahosted.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedorahosted.org/archives/list/freeipa-devel@lists.fedorahosted.org Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure