syncope-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ilgro...@apache.org
Subject [3/6] syncope git commit: Avoid duplicate ldapGroups
Date Thu, 01 Dec 2016 08:29:23 GMT
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/f7505fa6
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/f7505fa6
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/f7505fa6

Branch: refs/heads/2_0_X
Commit: f7505fa6e672024e1bb1a603ff5eb6ab0d00b0a9
Parents: f9b03e8
Author: Francesco Chicchiriccò <ilgrosso@apache.org>
Authored: Wed Nov 30 15:29:49 2016 +0100
Committer: Francesco Chicchiriccò <ilgrosso@apache.org>
Committed: Thu Dec 1 09:28:58 2016 +0100

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


http://git-wip-us.apache.org/repos/asf/syncope/blob/f7505fa6/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/propagation/LDAPMembershipPropagationActions.java
----------------------------------------------------------------------
diff --git a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/propagation/LDAPMembershipPropagationActions.java
b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/propagation/LDAPMembershipPropagationActions.java
index 54be326..29390be 100644
--- a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/propagation/LDAPMembershipPropagationActions.java
+++ b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/propagation/LDAPMembershipPropagationActions.java
@@ -102,14 +102,14 @@ public class LDAPMembershipPropagationActions extends DefaultPropagationActions
 
                 Set<String> groups = new HashSet<>(groupConnObjectLinks);
                 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 {


Mime
View raw message