Skip to content

Commit 02411e6

Browse files
committed
Group lookup correction; pulled version to 1.0.2
Signed-off-by: dwimberger <[email protected]>
1 parent db3430f commit 02411e6

File tree

4 files changed

+12
-4
lines changed

4 files changed

+12
-4
lines changed

pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<modelVersion>4.0.0</modelVersion>
55
<groupId>net.wimpi.crowd.ldap</groupId>
66
<artifactId>crowd-ldap-server</artifactId>
7-
<version>1.0.1-SNAPSHOT</version>
7+
<version>1.0.2-SNAPSHOT</version>
88
<packaging>jar</packaging>
99

1010
<name>Crowd-LDAP-Server</name>

run.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/sh
2-
JAR=target/crowd-ldap-server-1.0-SNAPSHOT.jar
2+
JAR=target/crowd-ldap-server-1.0.2-SNAPSHOT.jar
33

44
# Apache DS Settings
55
FIXADS="-Duser.language=en -Duser.country=US"

src/main/java/net/wimpi/crowd/ldap/CrowdPartition.java

+7-1
Original file line numberDiff line numberDiff line change
@@ -264,12 +264,18 @@ public boolean hasEntry(EntryOperationContext ctx) throws UserNotFoundException,
264264
log.error("hasEntry()", ex);
265265
}
266266
log.debug("Prefix=" + prefix);
267-
if (isCrowdGroups(prefix) || isCrowdUsers(prefix)) {
267+
if (isCrowdUsers(prefix)) {
268268
RDN rdn = dn.getRdn(2);
269269
String user = rdn.getNormValue();
270270
log.debug("user=" + user);
271271
ServerEntry userEntry = createUserEntry(dn);
272272
return (userEntry != null);
273+
} else if(isCrowdGroups(prefix)) {
274+
RDN rdn = dn.getRdn(2);
275+
String group = rdn.getNormValue();
276+
log.debug("group=" + group);
277+
ServerEntry groupEntry = createGroupEntry(dn);
278+
return (groupEntry != null);
273279
} else {
274280
log.debug("Prefix is neither users nor groups");
275281
log.debug("Crowd Users = " + m_CrowdUsersEntry.getDn());

testAuth.sh

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
#!/bin/bash
2-
USER_UID=<Crowd user>
2+
USER_UID=$1
3+
GROUP_ID=$2
34
ldapsearch -v -x -D 'uid='${USER_UID}',ou=users,dc=crowd' -W -H ldap://localhost:10389 -b ou=users,dc=crowd uid=${USER_UID}
5+
ldapsearch -WxD "uid=${USER_UID},ou=users,dc=crowd" -H ldap://localhost:10389 -b "dn=${GROUP_ID},ou=groups,dc=crowd"

0 commit comments

Comments
 (0)