jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r1671778 - in /jackrabbit/trunk: jackrabbit-jcr2dav/src/main/resources/ jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/security/authorization/ jackrabbit-spi2jcr/ jackrabbit-spi2jcr/src/main/java/org/apache/jackrabbit/spi2jc...
Date Tue, 07 Apr 2015 09:46:18 GMT
Author: angela
Date: Tue Apr  7 09:46:18 2015
New Revision: 1671778

URL: http://svn.apache.org/r1671778
Log:
JCR-3853 : JCR2SPI: Load ac provider resource

Added:
    jackrabbit/trunk/jackrabbit-jcr2dav/src/main/resources/accessControlProvider.properties
    jackrabbit/trunk/jackrabbit-webapp/src/main/webapp/WEB-INF/protectedHandlers.properties
Modified:
    jackrabbit/trunk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/security/authorization/AccessControlProviderStub.java
    jackrabbit/trunk/jackrabbit-spi2jcr/pom.xml
    jackrabbit/trunk/jackrabbit-spi2jcr/src/main/java/org/apache/jackrabbit/spi2jcr/XmlTree.java
    jackrabbit/trunk/jackrabbit-spi2jcr/src/test/java/org/apache/jackrabbit/spi2jcr/RepositoryStubImpl.java
    jackrabbit/trunk/jackrabbit-spi2jcr/src/test/resources/repository.xml

Added: jackrabbit/trunk/jackrabbit-jcr2dav/src/main/resources/accessControlProvider.properties
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr2dav/src/main/resources/accessControlProvider.properties?rev=1671778&view=auto
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr2dav/src/main/resources/accessControlProvider.properties
(added)
+++ jackrabbit/trunk/jackrabbit-jcr2dav/src/main/resources/accessControlProvider.properties
Tue Apr  7 09:46:18 2015
@@ -0,0 +1,16 @@
+#  Licensed to the Apache Software Foundation (ASF) under one or more
+#  contributor license agreements.  See the NOTICE file distributed with
+#  this work for additional information regarding copyright ownership.
+#  The ASF licenses this file to You under the Apache License, Version 2.0
+#  (the "License"); you may not use this file except in compliance with
+#  the License.  You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+
+org.apache.jackrabbit.jcr2spi.AccessControlProvider.class=org.apache.jackrabbit.jcr2spi.security.authorization.jackrabbit.acl.AccessControlProviderImpl

Modified: jackrabbit/trunk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/security/authorization/AccessControlProviderStub.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/security/authorization/AccessControlProviderStub.java?rev=1671778&r1=1671777&r2=1671778&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/security/authorization/AccessControlProviderStub.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/security/authorization/AccessControlProviderStub.java
Tue Apr  7 09:46:18 2015
@@ -96,7 +96,7 @@ public class AccessControlProviderStub {
 			try {
 				// not configured try to load as resource
 				Properties prop = new Properties();
-				InputStream is = AccessControlProviderStub.class.getResourceAsStream(ACCESS_CONTROL_PROVIDER_PROPERTIES);
+				InputStream is = AccessControlProviderStub.class.getClassLoader().getResourceAsStream(ACCESS_CONTROL_PROVIDER_PROPERTIES);
 				if (is != null) {
 					prop.load(is);
 					// loads the concrete class to instantiate.

Modified: jackrabbit/trunk/jackrabbit-spi2jcr/pom.xml
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-spi2jcr/pom.xml?rev=1671778&r1=1671777&r2=1671778&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-spi2jcr/pom.xml (original)
+++ jackrabbit/trunk/jackrabbit-spi2jcr/pom.xml Tue Apr  7 09:46:18 2015
@@ -62,6 +62,19 @@
                 org.apache.jackrabbit.test.api.LifecycleTest
 org.apache.jackrabbit.test.api.query.qom.EquiJoinConditionTest#testRightOuterJoin1<!--JCR-3493,
JCR-3498-->
 org.apache.jackrabbit.test.api.query.qom.EquiJoinConditionTest#testLeftOuterJoin2<!--JCR-3493,
JCR-3498-->
+
+                <!-- security related tests -->
+                <!-- The following 5 tests don't make too much sense on a jcr-client that
doesn't necessarily should
+                     know about the concrete implementation and thus might just collection
all information and
+                     delegate any optimization to the server-side -->
+                org.apache.jackrabbit.test.api.security.AccessControlListTest#testAddAggregatedPrivilegesSeparately
<!-- JCR-3832 -->
+                org.apache.jackrabbit.test.api.security.AccessControlListTest#testAddAccessControlEntryInvalidPrincipal
+                org.apache.jackrabbit.test.api.security.AccessControlListTest#testAddAccessControlEntryInvalidPrivilege
+                org.apache.jackrabbit.test.api.security.AccessControlListTest#testAddAccessControlEntryTwice
+                org.apache.jackrabbit.test.api.security.AccessControlListTest#testAddAccessControlEntryAgain
+                <!-- Tests to verify -->
+                org.apache.jackrabbit.test.api.security.RSessionAccessControlPolicyTest#testGetApplicablePolicies
+                org.apache.jackrabbit.test.api.security.RSessionAccessControlPolicyTest#testGetPolicy
               </value>
             </property>
           </systemProperties>

Modified: jackrabbit/trunk/jackrabbit-spi2jcr/src/main/java/org/apache/jackrabbit/spi2jcr/XmlTree.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-spi2jcr/src/main/java/org/apache/jackrabbit/spi2jcr/XmlTree.java?rev=1671778&r1=1671777&r2=1671778&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-spi2jcr/src/main/java/org/apache/jackrabbit/spi2jcr/XmlTree.java
(original)
+++ jackrabbit/trunk/jackrabbit-spi2jcr/src/main/java/org/apache/jackrabbit/spi2jcr/XmlTree.java
Tue Apr  7 09:46:18 2015
@@ -67,7 +67,7 @@ class XmlTree extends AbstractTree {
     private static void createXMLNodeFragment(StringBuilder xml, XmlTree tree, NamePathResolver
resolver, boolean includeNsInfo) throws RepositoryException {
         xml.append("<sv:node ");
         if (includeNsInfo) {
-           xml.append("xmlns:jcr=\"http://www.jcp.org/jcr/1.0\" xmlns:sv=\"http://www.jcp.org/jcr/sv/1.0\"");
+           xml.append("xmlns:jcr=\"http://www.jcp.org/jcr/1.0\" xmlns:sv=\"http://www.jcp.org/jcr/sv/1.0\"
");
         }
         xml.append("sv:name=\"").append(resolver.getJCRName(tree.getName())).append("\">");
         // jcr:primaryType

Modified: jackrabbit/trunk/jackrabbit-spi2jcr/src/test/java/org/apache/jackrabbit/spi2jcr/RepositoryStubImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-spi2jcr/src/test/java/org/apache/jackrabbit/spi2jcr/RepositoryStubImpl.java?rev=1671778&r1=1671777&r2=1671778&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-spi2jcr/src/test/java/org/apache/jackrabbit/spi2jcr/RepositoryStubImpl.java
(original)
+++ jackrabbit/trunk/jackrabbit-spi2jcr/src/test/java/org/apache/jackrabbit/spi2jcr/RepositoryStubImpl.java
Tue Apr  7 09:46:18 2015
@@ -17,14 +17,18 @@
 package org.apache.jackrabbit.spi2jcr;
 
 import org.apache.jackrabbit.core.JackrabbitRepositoryStub;
+import org.apache.jackrabbit.core.security.principal.EveryonePrincipal;
 import org.apache.jackrabbit.jcr2spi.AbstractRepositoryConfig;
 import org.apache.jackrabbit.jcr2spi.RepositoryImpl;
 import org.apache.jackrabbit.spi.RepositoryService;
 import org.apache.jackrabbit.spi.commons.name.NameConstants;
+import org.apache.jackrabbit.test.NotExecutableException;
 import org.apache.jackrabbit.test.RepositoryStubException;
 
 import javax.jcr.Repository;
 import javax.jcr.RepositoryException;
+import javax.jcr.Session;
+import java.security.Principal;
 import java.util.Properties;
 
 /**
@@ -69,6 +73,11 @@ public class RepositoryStubImpl extends
         return repo;
     }
 
+    @Override
+    public Principal getKnownPrincipal(Session session) throws RepositoryException {
+        return EveryonePrincipal.getInstance();
+    }
+
     /**
      *
      * @return

Modified: jackrabbit/trunk/jackrabbit-spi2jcr/src/test/resources/repository.xml
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-spi2jcr/src/test/resources/repository.xml?rev=1671778&r1=1671777&r2=1671778&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-spi2jcr/src/test/resources/repository.xml (original)
+++ jackrabbit/trunk/jackrabbit-spi2jcr/src/test/resources/repository.xml Tue Apr  7 09:46:18
2015
@@ -15,8 +15,8 @@
    See the License for the specific language governing permissions and
    limitations under the License.
 -->
-<!DOCTYPE Repository PUBLIC "-//The Apache Software Foundation//DTD Jackrabbit 1.6//EN"
-                            "http://jackrabbit.apache.org/dtd/repository-1.6.dtd">
+<!DOCTYPE Repository PUBLIC "-//The Apache Software Foundation//DTD Jackrabbit 2.0//EN"
+                            "http://jackrabbit.apache.org/dtd/repository-2.0.dtd">
 <!-- Example Repository Configuration File
      Used by
      - org.apache.jackrabbit.core.config.RepositoryConfigTest.java
@@ -105,6 +105,13 @@
             <param name="extractorPoolSize" value="2"/>
             <param name="supportHighlighting" value="true"/>
         </SearchIndex>
+
+        <!--
+        XML Import configuration of the workspace
+        -->
+        <Import>
+           <ProtectedItemImporter class="org.apache.jackrabbit.core.xml.AccessControlImporter"/>
+        </Import>
     </Workspace>
 
     <!--

Added: jackrabbit/trunk/jackrabbit-webapp/src/main/webapp/WEB-INF/protectedHandlers.properties
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-webapp/src/main/webapp/WEB-INF/protectedHandlers.properties?rev=1671778&view=auto
==============================================================================
--- jackrabbit/trunk/jackrabbit-webapp/src/main/webapp/WEB-INF/protectedHandlers.properties
(added)
+++ jackrabbit/trunk/jackrabbit-webapp/src/main/webapp/WEB-INF/protectedHandlers.properties
Tue Apr  7 09:46:18 2015
@@ -0,0 +1,17 @@
+#  Licensed to the Apache Software Foundation (ASF) under one or more
+#  contributor license agreements.  See the NOTICE file distributed with
+#  this work for additional information regarding copyright ownership.
+#  The ASF licenses this file to You under the Apache License, Version 2.0
+#  (the "License"); you may not use this file except in compliance with
+#  the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+
+# ProtectedItemRemoveHandler implementation class
+javax.jcr.tck.access.control.list.handler=org.apache.jackrabbit.server.remoting.davex.AclRemoveHandler



Mime
View raw message