Repository: syncope Updated Branches: refs/heads/2_1_X 251c267a7 -> 450f7c687
[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/450f7c68 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/450f7c68 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/450f7c68 Branch: refs/heads/2_1_X Commit: 450f7c6878f48b87077d29868c869b72cf9bb308 Parents: 251c267 Author: fmartelli <[email protected]> Authored: Tue Jul 10 10:50:23 2018 +0200 Committer: fmartelli <[email protected]> Committed: Tue Jul 10 10:51:49 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/450f7c68/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();
