You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@syncope.apache.org by il...@apache.org on 2025/05/28 10:41:54 UTC

(syncope) branch master updated: [SYNCOPE-1888] Change required property for specific inputs in policy configuration (#1091)

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

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


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

commit 6a1140a529810edb81348dee7294eac6b04f8a8e
Author: alberto bogi <35...@users.noreply.github.com>
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 cb9f88b0ee..708cdc2e0e 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
@@ -147,11 +147,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",
@@ -161,11 +161,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",
@@ -191,7 +191,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",