directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r678781 - /directory/apacheds/branches/bigbang/protocol-newldap/src/main/java/org/apache/directory/server/newldap/handlers/LdapRequestHandler.java
Date Tue, 22 Jul 2008 15:52:29 GMT
Author: akarasulu
Date: Tue Jul 22 08:52:29 2008
New Revision: 678781

URL: http://svn.apache.org/viewvc?rev=678781&view=rev
Log:
using allow annon access only on direcltoryService instead of ldapServer

Modified:
    directory/apacheds/branches/bigbang/protocol-newldap/src/main/java/org/apache/directory/server/newldap/handlers/LdapRequestHandler.java

Modified: directory/apacheds/branches/bigbang/protocol-newldap/src/main/java/org/apache/directory/server/newldap/handlers/LdapRequestHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/protocol-newldap/src/main/java/org/apache/directory/server/newldap/handlers/LdapRequestHandler.java?rev=678781&r1=678780&r2=678781&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/protocol-newldap/src/main/java/org/apache/directory/server/newldap/handlers/LdapRequestHandler.java
(original)
+++ directory/apacheds/branches/bigbang/protocol-newldap/src/main/java/org/apache/directory/server/newldap/handlers/LdapRequestHandler.java
Tue Jul 22 08:52:29 2008
@@ -92,26 +92,17 @@
             {
                 coreSession = ldapSession.getCoreSession();
             }
-            else
+            else if ( coreSession.getDirectoryService().isAllowAnonymousAccess() )
             {
                 coreSession = getLdapServer().getDirectoryService().getSession();
                 ldapSession.setCoreSession( coreSession );
             }
-            
-            /*
-             * Perform checks to see if anonymous access is allowed and enforce 
-             * anonymous policy.
-             */
-            if ( coreSession.isAnonymous() && ! ldapServer.isAllowAnonymousAccess()
)
+            else if ( message instanceof ResultResponseRequest )
             {
-                if ( message instanceof ResultResponseRequest )
-                {
-                    ResultResponse response = ( ( ResultResponseRequest ) message ).getResultResponse();
-                    response.getLdapResult().setErrorMessage( "Anonymous access disabled."
);
-                    response.getLdapResult().setResultCode( ResultCodeEnum.INSUFFICIENT_ACCESS_RIGHTS
);
-                    ldapSession.getIoSession().write( response );
-                }
-                
+                ResultResponse response = ( ( ResultResponseRequest ) message ).getResultResponse();
+                response.getLdapResult().setErrorMessage( "Anonymous access disabled." );
+                response.getLdapResult().setResultCode( ResultCodeEnum.INSUFFICIENT_ACCESS_RIGHTS
);
+                ldapSession.getIoSession().write( response );
                 return;
             }
         }



Mime
View raw message