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 2020/10/26 12:54:08 UTC

[syncope] branch 2_1_X updated: [SYNCOPE-1596] Restoring read from underlying PlainSchemaTO to properly set read-only attributes

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

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


The following commit(s) were added to refs/heads/2_1_X by this push:
     new 6d19549  [SYNCOPE-1596] Restoring read from underlying PlainSchemaTO to properly set read-only attributes
6d19549 is described below

commit 6d19549f6afe580a843bf9dd656cecfd2d5da8f8
Author: Francesco Chicchiriccò <il...@apache.org>
AuthorDate: Mon Oct 26 13:35:11 2020 +0100

    [SYNCOPE-1596] Restoring read from underlying PlainSchemaTO to properly set read-only attributes
---
 .../org/apache/syncope/client/console/wizards/any/PlainAttrs.java  | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/PlainAttrs.java b/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/PlainAttrs.java
index 03d7ee8..7fbc916 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/PlainAttrs.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/PlainAttrs.java
@@ -205,7 +205,8 @@ public class PlainAttrs extends AbstractAttrs<PlainSchemaTO> {
 
                 @Override
                 protected void populateItem(final ListItem<AttrTO> item) {
-                    setPanel(schemas, item, false);
+                    PlainSchemaTO schema = schemas.get(item.getModelObject().getSchema());
+                    setPanel(schemas, item, schema == null ? false : schema.isReadonly());
                 }
             });
         }
@@ -228,9 +229,9 @@ public class PlainAttrs extends AbstractAttrs<PlainSchemaTO> {
                 private static final long serialVersionUID = 5306618783986001008L;
 
                 @Override
-                @SuppressWarnings({ "unchecked", "rawtypes" })
                 protected void populateItem(final ListItem<AttrTO> item) {
-                    setPanel(schemas, item, false);
+                    PlainSchemaTO schema = schemas.get(item.getModelObject().getSchema());
+                    setPanel(schemas, item, schema == null ? false : schema.isReadonly());
                 }
             });
         }