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 2018/12/12 07:52:33 UTC

[syncope] branch master updated (56d67c5 -> 4e128aa)

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

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


    from 56d67c5  [SYNCOPE-1410] More robust Builders
     new 34e5985  GroupTO not getting status on read
     new 4e128aa  [SYNCOPE-1410] Avoid ClassCastException

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../syncope/core/provisioning/java/data/GroupDataBinderImpl.java    | 1 +
 .../apache/syncope/core/provisioning/java/utils/TemplateUtils.java  | 6 +++++-
 2 files changed, 6 insertions(+), 1 deletion(-)


[syncope] 02/02: [SYNCOPE-1410] Avoid ClassCastException

Posted by il...@apache.org.
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

commit 4e128aa366b6b08035e8f2476f2f60bd0b531f20
Author: Francesco Chicchiriccò <il...@apache.org>
AuthorDate: Wed Dec 12 08:52:24 2018 +0100

    [SYNCOPE-1410] Avoid ClassCastException
---
 .../apache/syncope/core/provisioning/java/utils/TemplateUtils.java  | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/utils/TemplateUtils.java b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/utils/TemplateUtils.java
index 65abf2f..cd23a66 100644
--- a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/utils/TemplateUtils.java
+++ b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/utils/TemplateUtils.java
@@ -185,7 +185,11 @@ public class TemplateUtils {
 
             fillRelationships((GroupableRelatableTO) reqEntity, ((GroupableRelatableTO) template));
             fillMemberships((GroupableRelatableTO) reqEntity, ((GroupableRelatableTO) template));
-            ((UserTO) reqEntity).getRoles().addAll(((UserTO) template).getRoles());
+            if (reqEntity instanceof UserTO) {
+                ((UserTO) reqEntity).getRoles().addAll(((UserTO) template).getRoles());
+            } else if (reqEntity instanceof UserCR) {
+                ((UserCR) reqEntity).getRoles().addAll(((UserTO) template).getRoles());
+            }
         } else if (template instanceof GroupTO) {
             if (StringUtils.isNotBlank(((GroupTO) template).getName())) {
                 String evaluated = JexlUtils.evaluate(((GroupTO) template).getName(), jexlContext);


[syncope] 01/02: GroupTO not getting status on read

Posted by il...@apache.org.
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

commit 34e5985e176628abb599635aed630eba08e45b73
Author: Francesco Chicchiriccò <il...@apache.org>
AuthorDate: Wed Dec 12 08:51:35 2018 +0100

    GroupTO not getting status on read
---
 .../apache/syncope/core/provisioning/java/data/GroupDataBinderImpl.java  | 1 +
 1 file changed, 1 insertion(+)

diff --git a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/data/GroupDataBinderImpl.java b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/data/GroupDataBinderImpl.java
index d14a7f5..91f22fb 100644
--- a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/data/GroupDataBinderImpl.java
+++ b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/data/GroupDataBinderImpl.java
@@ -330,6 +330,7 @@ public class GroupDataBinderImpl extends AbstractAnyDataBinder implements GroupD
         groupTO.setCreationDate(group.getCreationDate());
         groupTO.setLastModifier(group.getLastModifier());
         groupTO.setLastChangeDate(group.getLastChangeDate());
+        groupTO.setStatus(group.getStatus());
 
         groupTO.setKey(group.getKey());
         groupTO.setName(group.getName());