james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sbre...@apache.org
Subject svn commit: r1209479 - /james/server/trunk/ldap/src/main/java/org/apache/james/user/ldap/ReadOnlyUsersLDAPRepository.java
Date Fri, 02 Dec 2011 13:50:03 GMT
Author: sbrewin
Date: Fri Dec  2 13:50:03 2011
New Revision: 1209479

URL: http://svn.apache.org/viewvc?rev=1209479&view=rev
Log:
JAMES-1351 principal and credentials now optional

Modified:
    james/server/trunk/ldap/src/main/java/org/apache/james/user/ldap/ReadOnlyUsersLDAPRepository.java

Modified: james/server/trunk/ldap/src/main/java/org/apache/james/user/ldap/ReadOnlyUsersLDAPRepository.java
URL: http://svn.apache.org/viewvc/james/server/trunk/ldap/src/main/java/org/apache/james/user/ldap/ReadOnlyUsersLDAPRepository.java?rev=1209479&r1=1209478&r2=1209479&view=diff
==============================================================================
--- james/server/trunk/ldap/src/main/java/org/apache/james/user/ldap/ReadOnlyUsersLDAPRepository.java
(original)
+++ james/server/trunk/ldap/src/main/java/org/apache/james/user/ldap/ReadOnlyUsersLDAPRepository.java
Fri Dec  2 13:50:03 2011
@@ -86,10 +86,10 @@ import org.slf4j.Logger;
  * <ul>
  * <li><b>ldapHost:</b> The URL of the LDAP server to connect to.</li>
  * <li>
- * <b>principal:</b> The name (DN) of the user with which to initially bind to
+ * <b>principal:</b> (optional) The name (DN) of the user with which to initially
bind to
  * the LDAP server.</li>
  * <li>
- * <b>credentials:</b> The password with which to initially bind to the LDAP
+ * <b>credentials:</b> (optional) The password with which to initially bind to
the LDAP
  * server.</li>
  * <li>
  * <b>userBase:</b>The context within which to search for user entities.</li>
@@ -209,9 +209,9 @@ public class ReadOnlyUsersLDAPRepository
      */
     public void configure(HierarchicalConfiguration configuration) throws ConfigurationException
{
         ldapHost = configuration.getString("[@ldapHost]");
-        principal = configuration.getString("[@principal]");
-        // JAMES-1351 - ReadOnlyUsersLDAPRepository credentials parameter should be optional
-        //              Added an emtpy String as the default
+        // JAMES-1351 - ReadOnlyUsersLDAPRepository principal and credentials parameters
should be optional
+        //              Added an empty String as the default
+        principal = configuration.getString("[@principal]", "");
         credentials = configuration.getString("[@credentials]", "");
         userBase = configuration.getString("[@userBase]");
         userIdAttribute = configuration.getString("[@userIdAttribute]");



---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Mime
View raw message