jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From un...@apache.org
Subject svn commit: r1464061 - /jackrabbit/branches/2.6/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/ItemManager.java
Date Wed, 03 Apr 2013 14:59:53 GMT
Author: unico
Date: Wed Apr  3 14:59:53 2013
New Revision: 1464061

URL: http://svn.apache.org/r1464061
Log:
JCR-3382 let getNode do a permission check when the item is in the item manager cache: applying
patch by Frank van Lankvelt.

Modified:
    jackrabbit/branches/2.6/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/ItemManager.java

Modified: jackrabbit/branches/2.6/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/ItemManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/2.6/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/ItemManager.java?rev=1464061&r1=1464060&r2=1464061&view=diff
==============================================================================
--- jackrabbit/branches/2.6/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/ItemManager.java
(original)
+++ jackrabbit/branches/2.6/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/ItemManager.java
Wed Apr  3 14:59:53 2013
@@ -667,6 +667,11 @@ public class ItemManager implements Item
         AbstractNodeData data = retrieveItem(id, parentId);
         if (data == null) {
             data = (AbstractNodeData) getItemData(id, null, permissionCheck);
+        } else if (permissionCheck && !canRead(data, id)) {
+            // item exists but read-perm has been revoked in the mean time.
+            // -> remove from cache
+            evictItems(id);
+            throw new AccessDeniedException("cannot read item " + data.getId());
         }
         if (!data.getParentId().equals(parentId)) {
             // verify that parent actually appears in the shared set



Mime
View raw message