Repository: syncope
Updated Branches:
  refs/heads/2_0_X 0f32e624f -> 5415d2019


[SYNCOPE-1333] fix into VirAttr step in order to retrieve virtual attributes 
from memberships


Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/5415d201
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/5415d201
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/5415d201

Branch: refs/heads/2_0_X
Commit: 5415d20197b4d85995bdbb0d4891dd0c2d387534
Parents: 0f32e62
Author: fmartelli <[email protected]>
Authored: Tue Jul 10 10:50:23 2018 +0200
Committer: fmartelli <[email protected]>
Committed: Tue Jul 10 10:50:23 2018 +0200

----------------------------------------------------------------------
 .../org/apache/syncope/client/console/wizards/any/VirAttrs.java  | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/syncope/blob/5415d201/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/VirAttrs.java
----------------------------------------------------------------------
diff --git 
a/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/VirAttrs.java
 
b/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/VirAttrs.java
index 4ab5bee..1909613 100644
--- 
a/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/VirAttrs.java
+++ 
b/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/VirAttrs.java
@@ -33,6 +33,7 @@ import org.apache.syncope.client.console.wizards.AjaxWizard;
 import org.apache.syncope.common.lib.EntityTOUtils;
 import org.apache.syncope.common.lib.to.AnyTO;
 import org.apache.syncope.common.lib.to.AttrTO;
+import org.apache.syncope.common.lib.to.GroupableRelatableTO;
 import org.apache.syncope.common.lib.to.MembershipTO;
 import org.apache.syncope.common.lib.to.VirSchemaTO;
 import org.apache.syncope.common.lib.types.SchemaType;
@@ -146,7 +147,8 @@ public class VirAttrs extends AbstractAttrs<VirSchemaTO> {
     protected void setAttrs(final MembershipTO membershipTO) {
         List<AttrTO> attrs = new ArrayList<>();
 
-        Map<String, AttrTO> attrMap = 
EntityTOUtils.buildAttrMap(anyTO.getVirAttrs());
+        Map<String, AttrTO> attrMap = EntityTOUtils.buildAttrMap(
+                
GroupableRelatableTO.class.cast(anyTO).getMembership(membershipTO.getGroupKey()).getVirAttrs());
 
         for (VirSchemaTO schema : 
membershipSchemas.get(membershipTO.getGroupKey()).values()) {
             AttrTO attrTO = new AttrTO();

Reply via email to