directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r328979 - in /directory: apacheds/trunk/main/src/test/org/apache/ldap/server/MiscTest.java protocol-providers/ldap/trunk/src/main/java/org/apache/ldap/server/protocol/SessionRegistry.java
Date Thu, 27 Oct 2005 23:37:44 GMT
Author: akarasulu
Date: Thu Oct 27 16:37:40 2005
New Revision: 328979

URL: http://svn.apache.org/viewcvs?rev=328979&view=rev
Log:
changes ...

 o Fixed DIREVE-283 hopefully once and for all
 o Uncommented test case added by szoerner to test for DIREVE-283 case which
   now passes

Modified:
    directory/apacheds/trunk/main/src/test/org/apache/ldap/server/MiscTest.java
    directory/protocol-providers/ldap/trunk/src/main/java/org/apache/ldap/server/protocol/SessionRegistry.java

Modified: directory/apacheds/trunk/main/src/test/org/apache/ldap/server/MiscTest.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/trunk/main/src/test/org/apache/ldap/server/MiscTest.java?rev=328979&r1=328978&r2=328979&view=diff
==============================================================================
--- directory/apacheds/trunk/main/src/test/org/apache/ldap/server/MiscTest.java (original)
+++ directory/apacheds/trunk/main/src/test/org/apache/ldap/server/MiscTest.java Thu Oct 27
16:37:40 2005
@@ -187,7 +187,6 @@
      *
      * @throws Exception if anything goes wrong
      */
-    /*
     public void testAnonymousBindsEnabledBaseSearch() throws Exception
     {
         // Use the SUN JNDI provider to hit server port and bind as anonymous
@@ -213,7 +212,6 @@
         assertNotNull( result );
         assertNotNull( result.getAttributes().get("dc") );
     }
-    */
 
     /**
      * Reproduces the problem with

Modified: directory/protocol-providers/ldap/trunk/src/main/java/org/apache/ldap/server/protocol/SessionRegistry.java
URL: http://svn.apache.org/viewcvs/directory/protocol-providers/ldap/trunk/src/main/java/org/apache/ldap/server/protocol/SessionRegistry.java?rev=328979&r1=328978&r2=328979&view=diff
==============================================================================
--- directory/protocol-providers/ldap/trunk/src/main/java/org/apache/ldap/server/protocol/SessionRegistry.java
(original)
+++ directory/protocol-providers/ldap/trunk/src/main/java/org/apache/ldap/server/protocol/SessionRegistry.java
Thu Oct 27 16:37:40 2005
@@ -30,6 +30,8 @@
 
 import org.apache.ldap.common.exception.LdapNoPermissionException;
 import org.apache.ldap.server.jndi.ServerLdapContext;
+import org.apache.ldap.server.configuration.Configuration;
+import org.apache.ldap.server.configuration.StartupConfiguration;
 import org.apache.mina.protocol.ProtocolSession;
 
 
@@ -181,11 +183,11 @@
                 slc = ( ServerLdapContext ) ctx;
             }
             boolean isAnonymousUser = slc.getPrincipal().getName().trim().equals( "" );
-            boolean cfgAllowsAnonymous = env.containsKey( "server.disable.anonymous" );
+            StartupConfiguration cfg = ( StartupConfiguration ) Configuration.toConfiguration(
env );
 
             // if the user principal is anonymous and the configuration does not allow anonymous
binds we
             // prevent the operation by blowing a NoPermissionsException
-            if ( isAnonymousUser && !cfgAllowsAnonymous )
+            if ( isAnonymousUser && !cfg.isAllowAnonymousAccess() )
             {
                 throw new LdapNoPermissionException( "Anonymous binds have been disabled!"
);
             }



Mime
View raw message