james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nor...@apache.org
Subject svn commit: r1082136 - /james/server/trunk/ldap/src/main/java/org/apache/james/user/ldap/ReadOnlyUsersLDAPRepository.java
Date Wed, 16 Mar 2011 12:05:11 GMT
Author: norman
Date: Wed Mar 16 12:05:11 2011
New Revision: 1082136

URL: http://svn.apache.org/viewvc?rev=1082136&view=rev
Log:
Make sure we allow to use the ReadOnlyUsersLDAPRepository without a restriction. See JAMES-1204

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=1082136&r1=1082135&r2=1082136&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
Wed Mar 16 12:05:11 2011
@@ -234,7 +234,13 @@ public class ReadOnlyUsersLDAPRepository
         userIdAttribute = configuration.getString("[@userIdAttribute]");
         userObjectClass = configuration.getString("[@userObjectClass]");
 
-        restriction = new ReadOnlyLDAPGroupRestriction(configuration.configurationAt("restriction"));
+        HierarchicalConfiguration restrictionConfig = null;
+        // Check if we have a restriction we can use
+        // See JAMES-1204
+        if (configuration.containsKey("restriction")) {
+            restrictionConfig = configuration.configurationAt("restriction");
+        }
+        restriction = new ReadOnlyLDAPGroupRestriction(restrictionConfig);
 
     }
 



---------------------------------------------------------------------
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