jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r1433318 - in /jackrabbit/oak/trunk: oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/query/ oak-jcr/ oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/security/user/
Date Tue, 15 Jan 2013 09:27:44 GMT
Author: angela
Date: Tue Jan 15 09:27:43 2013
New Revision: 1433318

URL: http://svn.apache.org/viewvc?rev=1433318&view=rev
Log:
OAK-480 : Authorizable Query

- UserQueryManager: oak-query takes care of conversion from jcr to oak-path/name
- tmp. modify UserQuery test such that it's no longer blocked by OAK-343
- remove unused logger

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/query/UserQueryManager.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/query/XPathConditionVisitor.java
    jackrabbit/oak/trunk/oak-jcr/pom.xml
    jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/security/user/UserQueryTest.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/query/UserQueryManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/query/UserQueryManager.java?rev=1433318&r1=1433317&r2=1433318&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/query/UserQueryManager.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/query/UserQueryManager.java
Tue Jan 15 09:27:43 2013
@@ -197,15 +197,13 @@ public class UserQueryManager {
         String path;
         String ntName;
         if (relPath.indexOf('/') == -1) {
-            // search for properties somewhere below an authorizable node
-            propName = namePathMapper.getOakName(relPath);
+            // search for properties somewhere in the authorizable tree
+            propName = relPath;
             path = null;
             ntName = null;
         } else {
-            // FIXME: proper normalization of the relative path
-            String oakPath = namePathMapper.getOakPath(relPath);
-            propName = Text.getName(oakPath);
-            path = Text.getRelativeParent(oakPath, 1);
+            propName = Text.getName(relPath);
+            path = Text.getRelativeParent(relPath, 1);
             ntName = QueryUtil.getNodeTypeName(type);
         }
 

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/query/XPathConditionVisitor.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/query/XPathConditionVisitor.java?rev=1433318&r1=1433317&r2=1433318&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/query/XPathConditionVisitor.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/query/XPathConditionVisitor.java
Tue Jan 15 09:27:43 2013
@@ -20,16 +20,12 @@ import javax.jcr.RepositoryException;
 
 import org.apache.jackrabbit.oak.namepath.NamePathMapper;
 import org.apache.jackrabbit.oak.spi.security.user.UserConstants;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 /**
  * XPATH based condition visitor.
  */
 class XPathConditionVisitor implements ConditionVisitor {
 
-    static final Logger log = LoggerFactory.getLogger(XPathConditionVisitor.class);
-
     private final StringBuilder statement;
     private final NamePathMapper namePathMapper;
 

Modified: jackrabbit/oak/trunk/oak-jcr/pom.xml
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/pom.xml?rev=1433318&r1=1433317&r2=1433318&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/pom.xml (original)
+++ jackrabbit/oak/trunk/oak-jcr/pom.xml Tue Jan 15 09:27:43 2013
@@ -225,7 +225,7 @@
       org.apache.jackrabbit.oak.jcr.security.user.EveryoneGroupTest#testMembers         
                      <!-- OAK-343 -->
       org.apache.jackrabbit.oak.jcr.security.user.FindAuthorizablesTest#testFindAuthorizableByAddedProperty
   <!-- OAK-343 -->
       org.apache.jackrabbit.oak.jcr.security.user.FindAuthorizablesTest#testFindAuthorizableByRelativePath
    <!-- OAK-343 -->
-      org.apache.jackrabbit.oak.jcr.security.user.UserQueryTest                         
                <!-- OAK-343 -->
+      org.apache.jackrabbit.oak.jcr.security.user.UserQueryTest#testContains3           
                <!-- query statement contains current path element -->
       org.apache.jackrabbit.oak.jcr.security.user.UserManagerTest#testGetNewAuthorizable
                <!-- OAK-343 -->
       org.apache.jackrabbit.oak.jcr.security.user.UserManagerTest#testCreateGroupWithExistingPrincipal2
 <!-- OAK-343 -->
       org.apache.jackrabbit.oak.jcr.security.user.UserManagerTest#testCreateGroupWithExistingPrincipal3
 <!-- OAK-343 -->

Modified: jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/security/user/UserQueryTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/security/user/UserQueryTest.java?rev=1433318&r1=1433317&r2=1433318&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/security/user/UserQueryTest.java
(original)
+++ jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/security/user/UserQueryTest.java
Tue Jan 15 09:27:43 2013
@@ -764,11 +764,16 @@ public class UserQueryTest extends Abstr
     private Group createGroup(String name) throws RepositoryException {
         Group group = userMgr.createGroup(name);
         groups.add(group);
+        // TODO: remove again once OAK-343 is fixed.
+        superuser.save();
         return group;
     }
 
     private User createUser(String name, String food, double weight, boolean cute) throws
RepositoryException {
         User user = userMgr.createUser(name, "");
+        // TODO: remove again once OAK-343 is fixed.
+        superuser.save();
+
         user.setProperty("profile/food", vf.createValue(food));
         user.setProperty("profile/weight", vf.createValue(weight));
         user.setProperty("profile/cute", vf.createValue(cute));



Mime
View raw message