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 2016/11/30 14:29:30 UTC

syncope git commit: Avoid duplicate ldapGroups

Repository: syncope
Updated Branches:
  refs/heads/1_2_X 0539b7f49 -> 317f703b8


Avoid duplicate ldapGroups


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

Branch: refs/heads/1_2_X
Commit: 317f703b8b979d036d2a97b3e471fbea2f12b1e3
Parents: 0539b7f
Author: Francesco Chicchiricc� <il...@apache.org>
Authored: Wed Nov 30 15:29:20 2016 +0100
Committer: Francesco Chicchiricc� <il...@apache.org>
Committed: Wed Nov 30 15:29:20 2016 +0100

----------------------------------------------------------------------
 .../core/propagation/impl/LDAPMembershipPropagationActions.java  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/syncope/blob/317f703b/core/src/main/java/org/apache/syncope/core/propagation/impl/LDAPMembershipPropagationActions.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/syncope/core/propagation/impl/LDAPMembershipPropagationActions.java b/core/src/main/java/org/apache/syncope/core/propagation/impl/LDAPMembershipPropagationActions.java
index d3589ea..1a6e819 100644
--- a/core/src/main/java/org/apache/syncope/core/propagation/impl/LDAPMembershipPropagationActions.java
+++ b/core/src/main/java/org/apache/syncope/core/propagation/impl/LDAPMembershipPropagationActions.java
@@ -98,14 +98,14 @@ public class LDAPMembershipPropagationActions extends DefaultPropagationActions
 
                 Set<String> groups = new HashSet<String>(roleAccountLinks);
                 Attribute ldapGroups = AttributeUtil.find(getGroupMembershipAttrName(), attributes);
-
                 if (ldapGroups != null) {
                     for (Object obj : ldapGroups.getValue()) {
                         groups.add(obj.toString());
                     }
+                    attributes.remove(ldapGroups);
                 }
-
                 attributes.add(AttributeBuilder.build(getGroupMembershipAttrName(), groups));
+
                 task.setAttributes(attributes);
             }
         } else {