jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r1506870 - /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/authorization/permission/CompiledPermissionImpl.java
Date Thu, 25 Jul 2013 09:56:43 GMT
Author: angela
Date: Thu Jul 25 09:56:43 2013
New Revision: 1506870

URL: http://svn.apache.org/r1506870
Log:
OAK-527: permissions

- be defensive: deal with (unexpected) removal of a complete per-principal tree in the p-store.

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/authorization/permission/CompiledPermissionImpl.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/authorization/permission/CompiledPermissionImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/authorization/permission/CompiledPermissionImpl.java?rev=1506870&r1=1506869&r2=1506870&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/authorization/permission/CompiledPermissionImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/authorization/permission/CompiledPermissionImpl.java
Thu Jul 25 09:56:43 2013
@@ -82,9 +82,11 @@ class CompiledPermissionImpl implements 
         if (permissionsTree.exists()) {
             for (Principal principal : principals) {
                 Tree t = getPrincipalRoot(permissionsTree, principal);
+                Map<String, Tree> target = getTargetMap(principal);
                 if (t.exists()) {
-                    Map<String, Tree> target = getTargetMap(principal);
                     target.put(principal.getName(), t);
+                } else {
+                    target.remove(principal.getName());
                 }
             }
         }



Mime
View raw message