Author: ilgrosso
Date: Mon Jul 22 07:37:47 2013
New Revision: 1505612

URL: http://svn.apache.org/r1505612
Log:
[SYNCOPE-404] Merge from 1_1_X

Modified:
    syncope/trunk/   (props changed)
    syncope/trunk/common/src/main/java/org/apache/syncope/common/to/RoleTO.java
    
syncope/trunk/core/src/main/java/org/apache/syncope/core/connid/ConnObjectUtil.java

Propchange: syncope/trunk/
------------------------------------------------------------------------------
  Merged /syncope/branches/1_1_X:r1504874-1505611

Modified: 
syncope/trunk/common/src/main/java/org/apache/syncope/common/to/RoleTO.java
URL: 
http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/to/RoleTO.java?rev=1505612&r1=1505611&r2=1505612&view=diff
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/to/RoleTO.java 
(original)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/to/RoleTO.java 
Mon Jul 22 07:37:47 2013
@@ -61,6 +61,8 @@ public class RoleTO extends AbstractAttr
     private Long accountPolicy;
 
     public RoleTO() {
+        super();
+
         entitlements = new ArrayList<String>();
     }
 

Modified: 
syncope/trunk/core/src/main/java/org/apache/syncope/core/connid/ConnObjectUtil.java
URL: 
http://svn.apache.org/viewvc/syncope/trunk/core/src/main/java/org/apache/syncope/core/connid/ConnObjectUtil.java?rev=1505612&r1=1505611&r2=1505612&view=diff
==============================================================================
--- 
syncope/trunk/core/src/main/java/org/apache/syncope/core/connid/ConnObjectUtil.java
 (original)
+++ 
syncope/trunk/core/src/main/java/org/apache/syncope/core/connid/ConnObjectUtil.java
 Mon Jul 22 07:37:47 2013
@@ -232,6 +232,8 @@ public class ConnObjectUtil {
             return (T) AttributableOperations.diff(((UserTO) updated), 
((UserTO) original), true);
         }
         if (AttributableType.ROLE == attrUtil.getType()) {
+            // reading from connector object cannot change entitlements
+            ((RoleTO) updated).setEntitlements(((RoleTO) 
original).getEntitlements());
             return (T) AttributableOperations.diff(((RoleTO) updated), 
((RoleTO) original), true);
         }
 
@@ -244,7 +246,9 @@ public class ConnObjectUtil {
         final T attributableTO = attrUtil.newAttributableTO();
 
         // 1. fill with data from connector object
-        for (AbstractMappingItem item : 
attrUtil.getMappingItems(syncTask.getResource(), 
MappingPurpose.SYNCHRONIZATION)) {
+        for (AbstractMappingItem item : attrUtil.getMappingItems(
+                syncTask.getResource(), MappingPurpose.SYNCHRONIZATION)) {
+
             Attribute attribute = 
obj.getAttributeByName(item.getExtAttrName());
 
             AttributeTO attributeTO;


Reply via email to