jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r1466923 - in /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security: authorization/AccessControlContext.java user/UserContext.java
Date Thu, 11 Apr 2013 15:29:54 GMT
Author: angela
Date: Thu Apr 11 15:29:53 2013
New Revision: 1466923

URL: http://svn.apache.org/r1466923
Log:
OAK-527: permissions (WIP: missing handling for ac content in Session#hasPermission)

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/authorization/AccessControlContext.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/UserContext.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/authorization/AccessControlContext.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/authorization/AccessControlContext.java?rev=1466923&r1=1466922&r2=1466923&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/authorization/AccessControlContext.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/authorization/AccessControlContext.java
Thu Apr 11 15:29:53 2013
@@ -52,9 +52,10 @@ final class AccessControlContext impleme
 
     @Override
     public boolean definesLocation(TreeLocation location) {
-        if (location.exists()) {
+        Tree tree = location.getTree();
+        if (tree != null && location.exists()) {
             PropertyState p = location.getProperty();
-            return (p == null) ? definesTree(location.getTree()) : definesProperty(location.getTree(),
p);
+            return (p == null) ? definesTree(tree) : definesProperty(tree, p);
         } else {
             String path = location.getPath();
             String name = Text.getName(location.getPath());

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/UserContext.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/UserContext.java?rev=1466923&r1=1466922&r2=1466923&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/UserContext.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/UserContext.java
Thu Apr 11 15:29:53 2013
@@ -59,9 +59,10 @@ final class UserContext implements Conte
 
     @Override
     public boolean definesLocation(TreeLocation location) {
-        if (location.exists()) {
+        Tree tree = location.getTree();
+        if (tree != null && location.exists()) {
             PropertyState p = location.getProperty();
-            return (p == null) ? definesTree(location.getTree()) : definesProperty(location.getTree(),
p);
+            return (p == null) ? definesTree(tree) : definesProperty(tree, p);
         } else {
             // FIXME
             return false;



Mime
View raw message