This is an automated email from the ASF dual-hosted git repository.

ilgrosso pushed a commit to branch 3_0_X
in repository https://gitbox.apache.org/repos/asf/syncope.git


The following commit(s) were added to refs/heads/3_0_X by this push:
     new 2ff1678b51 [SYNCOPE-1888] Change required property for specific inputs 
in policy configuration (#1091)
2ff1678b51 is described below

commit 2ff1678b51c08700bbc17bd3df420f5c0f15abdc
Author: alberto bogi <[email protected]>
AuthorDate: Wed May 28 12:40:57 2025 +0200

    [SYNCOPE-1888] Change required property for specific inputs in policy 
configuration (#1091)
---
 .../client/console/policies/PolicyModalPanelBuilder.java       | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git 
a/client/idrepo/console/src/main/java/org/apache/syncope/client/console/policies/PolicyModalPanelBuilder.java
 
b/client/idrepo/console/src/main/java/org/apache/syncope/client/console/policies/PolicyModalPanelBuilder.java
index d9557cac86..164306d2ab 100644
--- 
a/client/idrepo/console/src/main/java/org/apache/syncope/client/console/policies/PolicyModalPanelBuilder.java
+++ 
b/client/idrepo/console/src/main/java/org/apache/syncope/client/console/policies/PolicyModalPanelBuilder.java
@@ -161,11 +161,11 @@ public class PolicyModalPanelBuilder<T extends PolicyTO> 
extends AbstractModalPa
 
             switch (type) {
                 case ACCOUNT:
-                    fields.add(new 
AjaxNumberFieldPanel.Builder<Integer>().min(1).build(
+                    fields.add(new 
AjaxNumberFieldPanel.Builder<Integer>().min(0).build(
                             "field",
                             "maxAuthenticationAttempts",
                             Integer.class,
-                            new PropertyModel<>(policyTO, 
"maxAuthenticationAttempts")));
+                            new PropertyModel<>(policyTO, 
"maxAuthenticationAttempts")).setRequired(true));
 
                     fields.add(new AjaxCheckBoxPanel(
                             "field",
@@ -180,11 +180,11 @@ public class PolicyModalPanelBuilder<T extends PolicyTO> 
extends AbstractModalPa
                     break;
 
                 case PASSWORD:
-                    fields.add(new 
AjaxNumberFieldPanel.Builder<Integer>().min(1).build(
+                    fields.add(new 
AjaxNumberFieldPanel.Builder<Integer>().min(0).build(
                             "field",
                             "historyLength",
                             Integer.class,
-                            new PropertyModel<>(policyTO, "historyLength")));
+                            new PropertyModel<>(policyTO, 
"historyLength")).setRequired(true));
 
                     fields.add(new AjaxCheckBoxPanel(
                             "field",
@@ -210,7 +210,7 @@ public class PolicyModalPanelBuilder<T extends PolicyTO> 
extends AbstractModalPa
                             "field",
                             "maxAttempts",
                             Integer.class,
-                            new PropertyModel<>(policyTO, "maxAttempts")));
+                            new PropertyModel<>(policyTO, 
"maxAttempts")).setRequired(true));
                     AjaxDropDownChoicePanel<Serializable> backOffStrategy = 
new AjaxDropDownChoicePanel<>(
                             "field",
                             "backOffStrategy",

Reply via email to