jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From resc...@apache.org
Subject svn commit: r1366001 - /jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authorization/acl/CachingEntryCollector.java
Date Thu, 26 Jul 2012 14:00:39 GMT
Author: reschke
Date: Thu Jul 26 14:00:38 2012
New Revision: 1366001

URL: http://svn.apache.org/viewvc?rev=1366001&view=rev
Log:
JCR-2950: make the special case for root ID handle cases where there's no ACL on the root
node as well

Modified:
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authorization/acl/CachingEntryCollector.java

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authorization/acl/CachingEntryCollector.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authorization/acl/CachingEntryCollector.java?rev=1366001&r1=1366000&r2=1366001&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authorization/acl/CachingEntryCollector.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authorization/acl/CachingEntryCollector.java
Thu Jul 26 14:00:38 2012
@@ -123,7 +123,7 @@ class CachingEntryCollector extends Entr
      */
     private Entries internalUpdateCache(NodeImpl node) throws RepositoryException {
         Entries entries = super.getEntries(node);
-        if (cacheNoAcl || !entries.isEmpty()) {
+        if (cacheNoAcl || (isRootId(node.getNodeId()) && cache.specialCasesRoot())
|| !entries.isEmpty()) {
             // adjust the 'nextId' to point to the next access controlled
             // ancestor node instead of the parent and remember the entries.
             entries.setNextId(getNextID(node));
@@ -369,6 +369,10 @@ class CachingEntryCollector extends Entr
             log.info("Root is special-cased: " + specialCaseRoot);
         }
 
+        public boolean specialCasesRoot() {
+            return specialCaseRoot;
+        }
+
         public boolean containsKey(NodeId id) {
             if (specialCaseRoot && isRootId(id)) {
                 return rootEntries != null;



Mime
View raw message