1
0
mirror of synced 2026-08-01 15:57:05 +00:00

Updated SpringSecurityLdapTemplate to include base LDAP context in returned DirContextAdapter entry to make sure the result gives a correct value for getNameInNamespace(). This is necessary when a search is used to obtain entries to pass to DefaultLdapAuthoritiesPopulator, for example.

This commit is contained in:
Luke Taylor
2008-01-28 00:39:42 +00:00
parent 80b6111641
commit 544df3ea09
@@ -204,7 +204,8 @@ public class SpringSecurityLdapTemplate extends org.springframework.ldap.core.Ld
dn.append(base);
}
return new DirContextAdapter(searchResult.getAttributes(), new DistinguishedName(dn.toString()));
return new DirContextAdapter(searchResult.getAttributes(),
new DistinguishedName(dn.toString()), new DistinguishedName(ctx.getNameInNamespace()));
}
});
}