jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tri...@apache.org
Subject svn commit: r810941 - in /jackrabbit/trunk: jackrabbit-api/src/main/java/org/apache/jackrabbit/api/security/JackrabbitAccessControlManager.java jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/DefaultAccessManager.java
Date Thu, 03 Sep 2009 13:52:00 GMT
Author: tripod
Date: Thu Sep  3 13:52:00 2009
New Revision: 810941

URL: http://svn.apache.org/viewvc?rev=810941&view=rev
Log:
JCR-2291 Issues with compiled permissions of ACL provider

Modified:
    jackrabbit/trunk/jackrabbit-api/src/main/java/org/apache/jackrabbit/api/security/JackrabbitAccessControlManager.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/DefaultAccessManager.java

Modified: jackrabbit/trunk/jackrabbit-api/src/main/java/org/apache/jackrabbit/api/security/JackrabbitAccessControlManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-api/src/main/java/org/apache/jackrabbit/api/security/JackrabbitAccessControlManager.java?rev=810941&r1=810940&r2=810941&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-api/src/main/java/org/apache/jackrabbit/api/security/JackrabbitAccessControlManager.java
(original)
+++ jackrabbit/trunk/jackrabbit-api/src/main/java/org/apache/jackrabbit/api/security/JackrabbitAccessControlManager.java
Thu Sep  3 13:52:00 2009
@@ -122,7 +122,10 @@
      * <code>AccessDeniedException</code> if the session lacks
      * <code>READ_ACCESS_CONTROL</code> privilege for the <code>absPath</code>
      * node.
-     *
+     * <p>
+     * Note that this method does not resolve any group membership, as this is
+     * the job of the user manager. nor does it augment the set with the
+     * "everyone" principal.
      *
      * @param absPath an absolute path.
      * @param principals a set of <code>Principal</code>s for which is the

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/DefaultAccessManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/DefaultAccessManager.java?rev=810941&r1=810940&r2=810941&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/DefaultAccessManager.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/DefaultAccessManager.java
Thu Sep  3 13:52:00 2009
@@ -421,11 +421,15 @@
         checkInitialized();
         checkValidNodePath(absPath);
         checkPermission(absPath, Permission.READ_AC);
-
-        int bits = acProvider.compilePermissions(principals).getPrivileges(resolver.getQPath(absPath));
-        return (bits == PrivilegeRegistry.NO_PRIVILEGE) ?
-                new Privilege[0] :
-                privilegeRegistry.getPrivileges(bits);
+        CompiledPermissions perms = acProvider.compilePermissions(principals);
+        try {
+            int bits = perms.getPrivileges(resolver.getQPath(absPath));
+            return (bits == PrivilegeRegistry.NO_PRIVILEGE) ?
+                    new Privilege[0] :
+                    privilegeRegistry.getPrivileges(bits);
+        } finally {
+            perms.close();
+        }
     }
 
     //---------------------------------------< AbstractAccessControlManager >---



Mime
View raw message