Author: bdaw
Date: 2009-01-07 04:40:54 -0500 (Wed, 07 Jan 2009)
New Revision: 12438
Modified:
modules/identity/branches/JBP_IDENTITY_BRANCH_1_0/identity/src/main/org/jboss/portal/identity/ldap/LDAPConnectionContext.java
Log:
JBPORTAL-2272 anonymous access in ldap
Modified:
modules/identity/branches/JBP_IDENTITY_BRANCH_1_0/identity/src/main/org/jboss/portal/identity/ldap/LDAPConnectionContext.java
===================================================================
---
modules/identity/branches/JBP_IDENTITY_BRANCH_1_0/identity/src/main/org/jboss/portal/identity/ldap/LDAPConnectionContext.java 2009-01-07
09:39:26 UTC (rev 12437)
+++
modules/identity/branches/JBP_IDENTITY_BRANCH_1_0/identity/src/main/org/jboss/portal/identity/ldap/LDAPConnectionContext.java 2009-01-07
09:40:54 UTC (rev 12438)
@@ -97,8 +97,10 @@
env.put(Context.INITIAL_CONTEXT_FACTORY, this.getContextFactory());
env.put(Context.PROVIDER_URL, "ldap://" + getHost() + ":" +
getPort());
env.put(Context.SECURITY_AUTHENTICATION, this.getAuthentication());
- env.put(Context.SECURITY_PRINCIPAL, this.getAdminDN());
- env.put(Context.SECURITY_CREDENTIALS, this.getAdminPassword());
+ if (this.getAdminDN() != null)
+ env.put(Context.SECURITY_PRINCIPAL, this.getAdminDN());
+ if (this.getAdminPassword() != null)
+ env.put(Context.SECURITY_CREDENTIALS, this.getAdminPassword());
if (this.getProtocol() != null)
{
Show replies by date