directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r679251 - /directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/AciAuthorizationInterceptor.java
Date Thu, 24 Jul 2008 00:50:39 GMT
Author: akarasulu
Date: Wed Jul 23 17:50:38 2008
New Revision: 679251

URL: http://svn.apache.org/viewvc?rev=679251&view=rev
Log:
fixing unnecessary lookup on has entry when ACI system is disabled

Modified:
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/AciAuthorizationInterceptor.java

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/AciAuthorizationInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/AciAuthorizationInterceptor.java?rev=679251&r1=679250&r2=679251&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/AciAuthorizationInterceptor.java
(original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/AciAuthorizationInterceptor.java
Wed Jul 23 17:50:38 2008
@@ -665,6 +665,10 @@
     public boolean hasEntry( NextInterceptor next, EntryOperationContext entryContext ) throws
Exception
     {
         LdapDN name = entryContext.getDn();
+        if ( ! enabled )
+        {
+            return name.size() == 0 || next.hasEntry( entryContext );
+        }
         
         ClonedServerEntry entry = entryContext.lookup( name, ByPassConstants.LOOKUP_BYPASS
);
             
@@ -672,7 +676,7 @@
         LdapPrincipal principal = entryContext.getSession().getEffectivePrincipal();
         LdapDN principalDn = principal.getJndiName();
 
-        if ( isPrincipalAnAdministrator( principalDn ) || !enabled || ( name.size() == 0
) ) // no checks on the rootdse
+        if ( isPrincipalAnAdministrator( principalDn ) || ( name.size() == 0 ) ) // no checks
on the rootdse
         {
             // No need to go down to the stack, if the dn is empty : it's the rootDSE, and
it exists !
             return name.size() == 0 || next.hasEntry( entryContext );



Mime
View raw message