directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kayyag...@apache.org
Subject svn commit: r1499759 - /directory/apacheds/trunk/interceptors/authz/src/main/java/org/apache/directory/server/core/authz/AciAuthorizationInterceptor.java
Date Thu, 04 Jul 2013 14:08:53 GMT
Author: kayyagari
Date: Thu Jul  4 14:08:53 2013
New Revision: 1499759

URL: http://svn.apache.org/r1499759
Log:
no need for a lookup as the updated entry is already available in the operation context after
a successful modification

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

Modified: directory/apacheds/trunk/interceptors/authz/src/main/java/org/apache/directory/server/core/authz/AciAuthorizationInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/interceptors/authz/src/main/java/org/apache/directory/server/core/authz/AciAuthorizationInterceptor.java?rev=1499759&r1=1499758&r2=1499759&view=diff
==============================================================================
--- directory/apacheds/trunk/interceptors/authz/src/main/java/org/apache/directory/server/core/authz/AciAuthorizationInterceptor.java
(original)
+++ directory/apacheds/trunk/interceptors/authz/src/main/java/org/apache/directory/server/core/authz/AciAuthorizationInterceptor.java
Thu Jul  4 14:08:53 2013
@@ -820,13 +820,7 @@ public class AciAuthorizationInterceptor
         {
             next( modifyContext );
 
-            /**
-             * @TODO: A virtual entry can be created here for not hitting the backend again.
-             */
-            CoreSession session = modifyContext.getSession();
-            LookupOperationContext lookupContext = new LookupOperationContext( session, dn,
-                SchemaConstants.ALL_ATTRIBUTES_ARRAY );
-            Entry modifiedEntry = directoryService.getPartitionNexus().lookup( lookupContext
);
+            Entry modifiedEntry = modifyContext.getAlteredEntry();
             tupleCache.subentryModified( dn, mods, modifiedEntry );
             groupCache.groupModified( dn, mods, entry, schemaManager );
 
@@ -946,14 +940,8 @@ public class AciAuthorizationInterceptor
         }
 
         next( modifyContext );
-        /**
-         * @TODO: A virtual entry can be created here for not hitting the backend again.
-         */
-        CoreSession session = modifyContext.getSession();
-        LookupOperationContext lookupContext = new LookupOperationContext( session, dn,
-            SchemaConstants.ALL_ATTRIBUTES_ARRAY );
 
-        Entry modifiedEntry = directoryService.getPartitionNexus().lookup( lookupContext
);
+        Entry modifiedEntry = modifyContext.getAlteredEntry();
         tupleCache.subentryModified( dn, mods, modifiedEntry );
         groupCache.groupModified( dn, mods, entry, schemaManager );
     }



Mime
View raw message