8e1ca3
From 7a1e1d9f1cb13679c28f12d05b156a08bcc4d856 Mon Sep 17 00:00:00 2001
8e1ca3
From: Carla Martinez <carlmart@redhat.com>
8e1ca3
Date: Fri, 29 Jul 2022 13:16:16 +0200
8e1ca3
Subject: [PATCH] webui: Allow grace login limit
8e1ca3
8e1ca3
There was no support for setting the grace login limit on the WebUI. The
8e1ca3
only way to so was only via CLI:
8e1ca3
8e1ca3
   `ipa pwpolicy-mod --gracelimit=2 global_policy`
8e1ca3
8e1ca3
Thus, the grace login limit must be updated from the policy section and
8e1ca3
this will reflect also on the user settings (under the 'Password Policy'
8e1ca3
section)
8e1ca3
8e1ca3
Fixes: https://pagure.io/freeipa/issue/9211
8e1ca3
8e1ca3
Signed-off-by: Carla Martinez <carlmart@redhat.com>
8e1ca3
Reviewed-By: Florence Blanc-Renaud <flo@redhat.com>
8e1ca3
---
8e1ca3
 install/ui/src/freeipa/policy.js | 3 +++
8e1ca3
 install/ui/src/freeipa/user.js   | 5 +++++
8e1ca3
 2 files changed, 8 insertions(+)
8e1ca3
8e1ca3
diff --git a/install/ui/src/freeipa/policy.js b/install/ui/src/freeipa/policy.js
8e1ca3
index fa2028a52b1118b6125f91153280da0a2ffe0584..7ec103636ced0cce34997d81a02b25ba73bda33f 100644
8e1ca3
--- a/install/ui/src/freeipa/policy.js
8e1ca3
+++ b/install/ui/src/freeipa/policy.js
8e1ca3
@@ -72,6 +72,9 @@ return {
8e1ca3
                         {
8e1ca3
                             name: 'cospriority',
8e1ca3
                             required: true
8e1ca3
+                        },
8e1ca3
+                        {
8e1ca3
+                            name: 'passwordgracelimit'
8e1ca3
                         }
8e1ca3
                     ]
8e1ca3
                 }]
8e1ca3
diff --git a/install/ui/src/freeipa/user.js b/install/ui/src/freeipa/user.js
8e1ca3
index a580db03599457eefd85f8c23d74c284946393c7..b47c97f72008f2f4e75b4cb88e9ff6756827b26e 100644
8e1ca3
--- a/install/ui/src/freeipa/user.js
8e1ca3
+++ b/install/ui/src/freeipa/user.js
8e1ca3
@@ -318,6 +318,11 @@ return {
8e1ca3
                             label: '@mo-param:pwpolicy:krbpwdlockoutduration:label',
8e1ca3
                             read_only: true,
8e1ca3
                             measurement_unit: 'seconds'
8e1ca3
+                        },
8e1ca3
+                        {
8e1ca3
+                            name: 'passwordgracelimit',
8e1ca3
+                            label: '@mo-param:pwpolicy:passwordgracelimit:label',
8e1ca3
+                            read_only: true
8e1ca3
                         }
8e1ca3
                     ]
8e1ca3
                 },
8e1ca3
-- 
8e1ca3
2.37.2
8e1ca3