Repository: syncope
Updated Branches:
  refs/heads/master c3dbca022 -> 3a0afb47b


[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/3a0afb47
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/3a0afb47
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/3a0afb47

Branch: refs/heads/master
Commit: 3a0afb47b4ef81fae1f8e208e720cc5880b9063e
Parents: c3dbca0
Author: fmartelli <[email protected]>
Authored: Tue Jul 10 10:50:23 2018 +0200
Committer: fmartelli <[email protected]>
Committed: Tue Jul 10 10:52:24 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/3a0afb47/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 7850fe9..79d58da 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
@@ -34,6 +34,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;
@@ -145,7 +146,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());
 
         
attrs.addAll(membershipSchemas.get(membershipTO.getGroupKey()).values().stream().map(schema
 -> {
             AttrTO attrTO = new AttrTO();

Reply via email to