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