From 7e9258cf0ca2be962800efc1121bcc214bffa670 Mon Sep 17 00:00:00 2001 From: giusmad Date: Mon, 12 Oct 2026 16:51:00 +0200 Subject: [PATCH 1/3] [SYNCOPE-2001] Fix for plainAttrs in readonly mode in customFormLayout --- .../client/enduser/panels/any/PlainAttrs.java | 21 ++----------------- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/client/idrepo/enduser/src/main/java/org/apache/syncope/client/enduser/panels/any/PlainAttrs.java b/client/idrepo/enduser/src/main/java/org/apache/syncope/client/enduser/panels/any/PlainAttrs.java index cecb9fffbe..5820380444 100644 --- a/client/idrepo/enduser/src/main/java/org/apache/syncope/client/enduser/panels/any/PlainAttrs.java +++ b/client/idrepo/enduser/src/main/java/org/apache/syncope/client/enduser/panels/any/PlainAttrs.java @@ -1,21 +1,3 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ package org.apache.syncope.client.enduser.panels.any; import java.util.HashMap; @@ -422,7 +404,8 @@ protected void populateItem(final ListItem item) { } AbstractFieldPanel panel = getFieldPanel(schema); - panel.setReadOnly(schema.isReadonly()); + boolean readonly = ((FieldPanel) panel).isReadOnly(); + panel.setReadOnly(schema.isReadonly() || readonly); if (schema.isMultivalue() && schema.getType() != AttrSchemaType.Dropdown) { panel = new MultiFieldPanel.Builder<>( new PropertyModel<>(attr, "values")).build( From 21cddb028651fa6ead7a74fee72d160c5e11bb70 Mon Sep 17 00:00:00 2001 From: giusmad Date: Mon, 12 Oct 2026 17:10:14 +0200 Subject: [PATCH 2/3] Licence in the head of the class --- .../client/enduser/panels/any/PlainAttrs.java | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/client/idrepo/enduser/src/main/java/org/apache/syncope/client/enduser/panels/any/PlainAttrs.java b/client/idrepo/enduser/src/main/java/org/apache/syncope/client/enduser/panels/any/PlainAttrs.java index 5820380444..8ff050eb8b 100644 --- a/client/idrepo/enduser/src/main/java/org/apache/syncope/client/enduser/panels/any/PlainAttrs.java +++ b/client/idrepo/enduser/src/main/java/org/apache/syncope/client/enduser/panels/any/PlainAttrs.java @@ -1,3 +1,21 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ package org.apache.syncope.client.enduser.panels.any; import java.util.HashMap; From 584b5eabb58c45e6664dd33930955d7a1e8a7f4a Mon Sep 17 00:00:00 2001 From: giusmad Date: Mon, 12 Oct 2026 17:23:14 +0200 Subject: [PATCH 3/3] removed a superfluous variable --- .../apache/syncope/client/enduser/panels/any/PlainAttrs.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/client/idrepo/enduser/src/main/java/org/apache/syncope/client/enduser/panels/any/PlainAttrs.java b/client/idrepo/enduser/src/main/java/org/apache/syncope/client/enduser/panels/any/PlainAttrs.java index 8ff050eb8b..58b44f1be5 100644 --- a/client/idrepo/enduser/src/main/java/org/apache/syncope/client/enduser/panels/any/PlainAttrs.java +++ b/client/idrepo/enduser/src/main/java/org/apache/syncope/client/enduser/panels/any/PlainAttrs.java @@ -422,8 +422,7 @@ protected void populateItem(final ListItem item) { } AbstractFieldPanel panel = getFieldPanel(schema); - boolean readonly = ((FieldPanel) panel).isReadOnly(); - panel.setReadOnly(schema.isReadonly() || readonly); + panel.setReadOnly(schema.isReadonly() || ((FieldPanel) panel).isReadOnly()); if (schema.isMultivalue() && schema.getType() != AttrSchemaType.Dropdown) { panel = new MultiFieldPanel.Builder<>( new PropertyModel<>(attr, "values")).build(