directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r937471 - /directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/AciAuthorizationInterceptor.java
Date Fri, 23 Apr 2010 19:05:33 GMT
Author: elecharny
Date: Fri Apr 23 19:05:32 2010
New Revision: 937471

URL: http://svn.apache.org/viewvc?rev=937471&view=rev
Log:
Slight improvement in the code organization to favor debugging and step through

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

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/AciAuthorizationInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/AciAuthorizationInterceptor.java?rev=937471&r1=937470&r2=937471&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/AciAuthorizationInterceptor.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/AciAuthorizationInterceptor.java
Fri Apr 23 19:05:32 2010
@@ -762,7 +762,10 @@ public class AciAuthorizationInterceptor
 
     public ClonedServerEntry lookup( NextInterceptor next, LookupOperationContext lookupContext
) throws Exception
     {
-        LdapPrincipal principal = lookupContext.getSession().getEffectivePrincipal();
+        CoreSession session = lookupContext.getSession();
+        DirectoryService directoryService = session.getDirectoryService();
+        
+        LdapPrincipal principal = session.getEffectivePrincipal();
         DN principalDn = principal.getClonedName();
         
         if ( !principalDn.isNormalized() )
@@ -770,16 +773,16 @@ public class AciAuthorizationInterceptor
             principalDn.normalize( schemaManager.getNormalizerMapping() );
         }
         
-        if ( isPrincipalAnAdministrator( principalDn ) || !lookupContext.getSession().getDirectoryService().isAccessControlEnabled()
)
+        if ( isPrincipalAnAdministrator( principalDn ) || !directoryService.isAccessControlEnabled()
)
         {
             return next.lookup( lookupContext );
         }
 
         lookupContext.setByPassed( ByPassConstants.LOOKUP_BYPASS );
-        ServerEntry entry = lookupContext.getSession().getDirectoryService()
-            .getOperationManager().lookup( lookupContext );
+        ServerEntry entry = directoryService.getOperationManager().lookup( lookupContext
);
 
         checkLookupAccess( lookupContext, entry );
+        
         return next.lookup( lookupContext );
     }
 



Mime
View raw message