URL: https://github.com/freeipa/freeipa/pull/6086
Author: fcami
 Title: #6086: pwpolicy: change error message
Action: opened

PR body:
"""
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: 
Signed-off-by: François Cami <fc...@redhat.com>
"""

To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/6086/head:pr6086
git checkout pr6086
From 1a901aae7108bacf4be91211d32d1dc0ba5214b1 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 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: TBD
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..a6a04d8a8cb 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 "
+                        "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

Reply via email to