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