first try
This commit is contained in:
parent
aeb14d2fab
commit
fe664c60c3
|
@ -21,7 +21,7 @@
|
|||
</classpathentry>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
|
||||
<attributes>
|
||||
<attribute name="owner.project.facets" value="java"/>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="output" path="target/classes"/>
|
||||
|
|
2
pom.xml
2
pom.xml
|
@ -11,7 +11,7 @@
|
|||
<groupId>org.gcube.portal</groupId>
|
||||
<artifactId>ldap-export-servlet</artifactId>
|
||||
<packaging>war</packaging>
|
||||
<version>1.2.1</version>
|
||||
<version>1.3.0</version>
|
||||
<name>ldap-export-servlet Maven Webapp</name>
|
||||
<description>This component read periodically exports users and their groups in LDAP</description>
|
||||
<properties>
|
||||
|
|
|
@ -201,7 +201,14 @@ public class LDAPSync implements Runnable {
|
|||
Attributes attributes = new BasicAttributes();
|
||||
attributes.put(memberUid);
|
||||
ctx.modifyAttributes(vreSubCtx, DirContext.ADD_ATTRIBUTE, attributes);
|
||||
_log.info("Adding user: " + user);
|
||||
_log.info("Adding user as memberUid: " + user );
|
||||
|
||||
Attribute member = new BasicAttribute("member");
|
||||
member.add("uid="+user+","+vreSubCtx);
|
||||
Attributes attributes2 = new BasicAttributes();
|
||||
attributes2.put(member);
|
||||
ctx.modifyAttributes(vreSubCtx, DirContext.ADD_ATTRIBUTE, attributes2);
|
||||
_log.info("Adding user as memberUid: " + user );
|
||||
}
|
||||
catch (javax.naming.directory.AttributeInUseException ex) {
|
||||
_log.trace("Not adding already existing user: " + user);
|
||||
|
@ -259,9 +266,9 @@ public class LDAPSync implements Runnable {
|
|||
|
||||
Attribute objectClass = new BasicAttribute("objectClass");
|
||||
objectClass.add("top");
|
||||
objectClass.add("groupofnames");
|
||||
objectClass.add("posixGroup");
|
||||
// objectClass.add("researchProject");
|
||||
// objectClass.add("groupOfMembers");
|
||||
objectClass.add("nestedGroup");
|
||||
attributes.put(objectClass);
|
||||
|
||||
Attribute cn = new BasicAttribute("cn");
|
||||
|
|
Reference in New Issue