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