You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jackrabbit.apache.org by tr...@apache.org on 2018/06/20 02:07:45 UTC

svn commit: r1833885 - in /jackrabbit/commons/filevault/trunk/vault-core/src: main/java/org/apache/jackrabbit/vault/fs/impl/io/ test/java/org/apache/jackrabbit/vault/packaging/integration/ test/resources/org/apache/jackrabbit/vault/packaging/integratio...

Author: tripod
Date: Wed Jun 20 02:07:44 2018
New Revision: 1833885

URL: http://svn.apache.org/viewvc?rev=1833885&view=rev
Log:
JCRVLT-292 Order of ACLs are altered on installation of content packages

Added:
    jackrabbit/commons/filevault/trunk/vault-core/src/test/java/org/apache/jackrabbit/vault/packaging/integration/TestAceOrder.java
    jackrabbit/commons/filevault/trunk/vault-core/src/test/resources/org/apache/jackrabbit/vault/packaging/integration/testpackages/ace_order_overwrite.zip/
    jackrabbit/commons/filevault/trunk/vault-core/src/test/resources/org/apache/jackrabbit/vault/packaging/integration/testpackages/ace_order_overwrite.zip/META-INF/
    jackrabbit/commons/filevault/trunk/vault-core/src/test/resources/org/apache/jackrabbit/vault/packaging/integration/testpackages/ace_order_overwrite.zip/META-INF/vault/
    jackrabbit/commons/filevault/trunk/vault-core/src/test/resources/org/apache/jackrabbit/vault/packaging/integration/testpackages/ace_order_overwrite.zip/META-INF/vault/definition/
    jackrabbit/commons/filevault/trunk/vault-core/src/test/resources/org/apache/jackrabbit/vault/packaging/integration/testpackages/ace_order_overwrite.zip/META-INF/vault/definition/.content.xml
    jackrabbit/commons/filevault/trunk/vault-core/src/test/resources/org/apache/jackrabbit/vault/packaging/integration/testpackages/ace_order_overwrite.zip/META-INF/vault/filter.xml
    jackrabbit/commons/filevault/trunk/vault-core/src/test/resources/org/apache/jackrabbit/vault/packaging/integration/testpackages/ace_order_overwrite.zip/META-INF/vault/nodetypes.cnd
    jackrabbit/commons/filevault/trunk/vault-core/src/test/resources/org/apache/jackrabbit/vault/packaging/integration/testpackages/ace_order_overwrite.zip/META-INF/vault/properties.xml
    jackrabbit/commons/filevault/trunk/vault-core/src/test/resources/org/apache/jackrabbit/vault/packaging/integration/testpackages/ace_order_overwrite.zip/jcr_root/
    jackrabbit/commons/filevault/trunk/vault-core/src/test/resources/org/apache/jackrabbit/vault/packaging/integration/testpackages/ace_order_overwrite.zip/jcr_root/.content.xml
    jackrabbit/commons/filevault/trunk/vault-core/src/test/resources/org/apache/jackrabbit/vault/packaging/integration/testpackages/ace_order_overwrite.zip/jcr_root/testroot/
    jackrabbit/commons/filevault/trunk/vault-core/src/test/resources/org/apache/jackrabbit/vault/packaging/integration/testpackages/ace_order_overwrite.zip/jcr_root/testroot/secured/
    jackrabbit/commons/filevault/trunk/vault-core/src/test/resources/org/apache/jackrabbit/vault/packaging/integration/testpackages/ace_order_overwrite.zip/jcr_root/testroot/secured/.content.xml
    jackrabbit/commons/filevault/trunk/vault-core/src/test/resources/org/apache/jackrabbit/vault/packaging/integration/testpackages/ace_order_overwrite.zip/jcr_root/testroot/secured/_rep_policy.xml
Modified:
    jackrabbit/commons/filevault/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/fs/impl/io/JackrabbitACLImporter.java

Modified: jackrabbit/commons/filevault/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/fs/impl/io/JackrabbitACLImporter.java
URL: http://svn.apache.org/viewvc/jackrabbit/commons/filevault/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/fs/impl/io/JackrabbitACLImporter.java?rev=1833885&r1=1833884&r2=1833885&view=diff
==============================================================================
--- jackrabbit/commons/filevault/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/fs/impl/io/JackrabbitACLImporter.java (original)
+++ jackrabbit/commons/filevault/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/fs/impl/io/JackrabbitACLImporter.java Wed Jun 20 02:07:44 2018
@@ -134,16 +134,6 @@ public class JackrabbitACLImporter imple
         states.push(state);
     }
 
-    private static ACE addACE(Map<String, List<ACE>> map, ACE ace) {
-        List<ACE> list = map.get(ace.principalName);
-        if (list == null) {
-            list = new ArrayList<ACE>();
-            map.put(ace.principalName, list);
-        }
-        list.add(ace);
-        return ace;
-    }
-
     public void endNode() throws SAXException {
         State state = states.pop();
         importPolicy.endNode(state);
@@ -177,14 +167,11 @@ public class JackrabbitACLImporter imple
         abstract void apply(List<String> paths) throws RepositoryException;
 
         Principal getPrincipal(final String principalName) {
-            Principal principal = pMgr.getPrincipal(principalName);
-            if (principal == null) {
-                principal = new Principal() {
-                    public String getName() {
-                        return principalName;
-                    }
-                };
-            }
+            Principal principal = new Principal() {
+                public String getName() {
+                    return principalName;
+                }
+            };
             return principal;
         }
 
@@ -214,7 +201,7 @@ public class JackrabbitACLImporter imple
 
     private final class ImportedAcList extends ImportedPolicy<JackrabbitAccessControlList> {
 
-        private Map<String, List<ACE>> aceMap = new LinkedHashMap<String, List<ACE>>();
+        private List<ACE> aceList = new ArrayList<>();
         private ACE currentACE;
 
         private ImportedAcList() {
@@ -224,7 +211,8 @@ public class JackrabbitACLImporter imple
         State append(State state, DocViewNode childNode) {
             if (state == State.ACL) {
                 try {
-                    currentACE = addACE(aceMap, new ACE(childNode));
+                    currentACE = new ACE(childNode);
+                    aceList.add(currentACE);
                     return State.ACE;
                 } catch (IllegalArgumentException e) {
                     log.error("Error while reading access control content: {}", e);
@@ -272,9 +260,9 @@ public class JackrabbitACLImporter imple
         // clear all ACEs of the package principals for merge (VLT-94), otherwise the `acl.addEntry()` below
         // might just combine the privileges.
         if (aclHandling == AccessControlHandling.MERGE) {
-            for (String name: aceMap.keySet()) {
+            for (ACE entry : aceList) {
                 for (AccessControlEntry ace : acl.getAccessControlEntries()) {
-                    if (ace.getPrincipal().getName().equals(name)) {
+                    if (ace.getPrincipal().getName().equals(entry.principalName)) {
                         acl.removeAccessControlEntry(ace);
                     }
                 }
@@ -282,38 +270,36 @@ public class JackrabbitACLImporter imple
         }
 
             // apply ACEs of package
-            for (Map.Entry<String, List<ACE>> entry: aceMap.entrySet()) {
-                final String principalName = entry.getKey();
+            for (ACE ace : aceList) {
+                final String principalName = ace.principalName;
                 if (aclHandling == AccessControlHandling.MERGE_PRESERVE && existingPrincipals.contains(principalName)) {
                     // skip principal if it already has an ACL
                     continue;
                 }
                 Principal principal = getPrincipal(principalName);
 
-                for (ACE ace: entry.getValue()) {
-                    Privilege[] privileges = new Privilege[ace.privileges.length];
-                    for (int i = 0; i < privileges.length; i++) {
-                        privileges[i] = acMgr.privilegeFromName(ace.privileges[i]);
-                    }
-                    Map<String, Value> svRestrictions = new HashMap<String, Value>();
-                    Map<String, Value[]> mvRestrictions = new HashMap<String, Value[]>();
-                    for (String restName : acl.getRestrictionNames()) {
-                        DocViewProperty restriction = ace.restrictions.get(restName);
-                        if (restriction != null) {
-                            Value[] values = new Value[restriction.values.length];
-                            int type = acl.getRestrictionType(restName);
-                            for (int i=0; i<values.length; i++) {
-                                values[i] = valueFactory.createValue(restriction.values[i], type);
-                            }
-                            if (restriction.isMulti) {
-                                mvRestrictions.put(restName, values);
-                            } else {
-                                svRestrictions.put(restName, values[0]);
-                            }
+                Privilege[] privileges = new Privilege[ace.privileges.length];
+                for (int i = 0; i < privileges.length; i++) {
+                    privileges[i] = acMgr.privilegeFromName(ace.privileges[i]);
+                }
+                Map<String, Value> svRestrictions = new HashMap<String, Value>();
+                Map<String, Value[]> mvRestrictions = new HashMap<String, Value[]>();
+                for (String restName : acl.getRestrictionNames()) {
+                    DocViewProperty restriction = ace.restrictions.get(restName);
+                    if (restriction != null) {
+                        Value[] values = new Value[restriction.values.length];
+                        int type = acl.getRestrictionType(restName);
+                        for (int i=0; i<values.length; i++) {
+                            values[i] = valueFactory.createValue(restriction.values[i], type);
+                        }
+                        if (restriction.isMulti) {
+                            mvRestrictions.put(restName, values);
+                        } else {
+                            svRestrictions.put(restName, values[0]);
                         }
                     }
-                    acl.addEntry(principal, privileges, ace.allow, svRestrictions, mvRestrictions);
                 }
+                acl.addEntry(principal, privileges, ace.allow, svRestrictions, mvRestrictions);
             }
             acMgr.setPolicy(accessControlledPath, acl);
 

Added: jackrabbit/commons/filevault/trunk/vault-core/src/test/java/org/apache/jackrabbit/vault/packaging/integration/TestAceOrder.java
URL: http://svn.apache.org/viewvc/jackrabbit/commons/filevault/trunk/vault-core/src/test/java/org/apache/jackrabbit/vault/packaging/integration/TestAceOrder.java?rev=1833885&view=auto
==============================================================================
--- jackrabbit/commons/filevault/trunk/vault-core/src/test/java/org/apache/jackrabbit/vault/packaging/integration/TestAceOrder.java (added)
+++ jackrabbit/commons/filevault/trunk/vault-core/src/test/java/org/apache/jackrabbit/vault/packaging/integration/TestAceOrder.java Wed Jun 20 02:07:44 2018
@@ -0,0 +1,111 @@
+/*
+ * 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.
+ */
+package org.apache.jackrabbit.vault.packaging.integration;
+
+import java.security.Principal;
+import java.util.List;
+import javax.annotation.Nonnull;
+import javax.jcr.Node;
+import javax.jcr.ValueFactory;
+import javax.jcr.security.AccessControlEntry;
+import javax.jcr.security.AccessControlManager;
+import javax.jcr.security.Privilege;
+
+import com.google.common.collect.ImmutableList;
+import com.google.common.collect.ImmutableMap;
+import org.apache.jackrabbit.api.JackrabbitSession;
+import org.apache.jackrabbit.api.security.JackrabbitAccessControlList;
+import org.apache.jackrabbit.api.security.user.Authorizable;
+import org.apache.jackrabbit.api.security.user.User;
+import org.apache.jackrabbit.api.security.user.UserManager;
+import org.apache.jackrabbit.commons.jackrabbit.authorization.AccessControlUtils;
+import org.junit.Ignore;
+import org.junit.Test;
+
+import static org.junit.Assert.assertEquals;
+
+/**
+ * Test if order of ACE is preserved upon import
+ */
+public class TestAceOrder extends IntegrationTestBase {
+
+    private final static String NAME_TEST_USER = "testuser";
+
+    private UserManager uMgr;
+    private AccessControlManager acMgr;
+
+    private List<AccessControlEntry> expectedEntries;
+
+    @Override
+    public void setUp() throws Exception {
+        super.setUp();
+        uMgr = ((JackrabbitSession) admin).getUserManager();
+        User testuser = uMgr.createUser(NAME_TEST_USER, null);
+        admin.save();
+
+        acMgr = admin.getAccessControlManager();
+
+        Node tmp = admin.getRootNode().addNode("testroot").addNode("secured");
+        JackrabbitAccessControlList list = AccessControlUtils.getAccessControlList(acMgr, tmp.getPath());
+        Privilege[] writePrivilege = AccessControlUtils.privilegesFromNames(acMgr, Privilege.JCR_WRITE);
+        ValueFactory vf = admin.getValueFactory();
+        Principal everyone = ((JackrabbitSession) admin).getPrincipalManager().getEveryone();
+        list.addEntry(everyone, writePrivilege, true, ImmutableMap.of("rep:glob", vf.createValue("/foo")));
+        list.addEntry(testuser.getPrincipal(), writePrivilege, false, ImmutableMap.of("rep:glob", vf.createValue("/foo")));
+        list.addEntry(everyone, writePrivilege, true, ImmutableMap.of("rep:glob", vf.createValue("/bar")));
+        acMgr.setPolicy(tmp.getPath(), list);
+
+        expectedEntries = ImmutableList.copyOf(list.getAccessControlEntries());
+
+        admin.refresh(false);
+    }
+
+    @Override
+    public void tearDown() throws Exception {
+        try {
+            if (admin.nodeExists("/testroot")) {
+                admin.getNode("/testroot").remove();
+                admin.save();
+            }
+            Authorizable testUser = uMgr.getAuthorizable(NAME_TEST_USER);
+            if (testUser != null) {
+                testUser.remove();
+                admin.save();
+            }
+        } finally {
+            super.tearDown();
+        }
+    }
+
+    private void assertACEs(@Nonnull String path) throws Exception {
+        JackrabbitAccessControlList list = AccessControlUtils.getAccessControlList(acMgr, path);
+        AccessControlEntry[] entries = list.getAccessControlEntries();
+
+        assertEquals(expectedEntries, ImmutableList.copyOf(entries));
+    }
+
+    @Test
+    public void testHandlingOverwrite() throws Exception {
+        assertNodeMissing("/testroot/secured");
+
+        extractVaultPackage("testpackages/ace_order_overwrite.zip");
+
+        // test if nodes and ACLs of first package exist
+        assertNodeExists("/testroot/secured");
+        assertACEs("/testroot/secured");
+    }
+}
\ No newline at end of file

Added: jackrabbit/commons/filevault/trunk/vault-core/src/test/resources/org/apache/jackrabbit/vault/packaging/integration/testpackages/ace_order_overwrite.zip/META-INF/vault/definition/.content.xml
URL: http://svn.apache.org/viewvc/jackrabbit/commons/filevault/trunk/vault-core/src/test/resources/org/apache/jackrabbit/vault/packaging/integration/testpackages/ace_order_overwrite.zip/META-INF/vault/definition/.content.xml?rev=1833885&view=auto
==============================================================================
--- jackrabbit/commons/filevault/trunk/vault-core/src/test/resources/org/apache/jackrabbit/vault/packaging/integration/testpackages/ace_order_overwrite.zip/META-INF/vault/definition/.content.xml (added)
+++ jackrabbit/commons/filevault/trunk/vault-core/src/test/resources/org/apache/jackrabbit/vault/packaging/integration/testpackages/ace_order_overwrite.zip/META-INF/vault/definition/.content.xml Wed Jun 20 02:07:44 2018
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ 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.
+  -->
+
+<jcr:root xmlns:vlt="http://www.day.com/jcr/vault/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0"
+    jcr:created="{Date}2018-05-17T17:41:46.815+02:00"
+    jcr:createdBy="admin"
+    jcr:description="AC Handling: OverWrite"
+    jcr:lastModified="{Date}2018-05-17T17:41:46.815+02:00"
+    jcr:lastModifiedBy="admin"
+    jcr:primaryType="vlt:PackageDefinition"
+    acHandling="overwrite"
+    buildCount="1"
+    builtWith=""
+    fixedBugs=""
+    group="support"
+    lastUnwrapped="{Date}2018-05-17T17:41:46.815+02:00"
+    lastUnwrappedBy="admin"
+    lastWrapped="{Date}2018-05-17T17:41:46.815+02:00"
+    lastWrappedBy="admin"
+    name=""
+    providerLink=""
+    providerName=""
+    providerUrl=""
+    testedWith=""
+    version="">
+    <filter jcr:primaryType="nt:unstructured">
+        <f0
+            jcr:primaryType="nt:unstructured"
+            mode="replace"
+            root="/testroot/secured"
+            rules="[]"/>
+    </filter>
+    <screenshots jcr:primaryType="nt:unstructured"/>
+</jcr:root>

Added: jackrabbit/commons/filevault/trunk/vault-core/src/test/resources/org/apache/jackrabbit/vault/packaging/integration/testpackages/ace_order_overwrite.zip/META-INF/vault/filter.xml
URL: http://svn.apache.org/viewvc/jackrabbit/commons/filevault/trunk/vault-core/src/test/resources/org/apache/jackrabbit/vault/packaging/integration/testpackages/ace_order_overwrite.zip/META-INF/vault/filter.xml?rev=1833885&view=auto
==============================================================================
--- jackrabbit/commons/filevault/trunk/vault-core/src/test/resources/org/apache/jackrabbit/vault/packaging/integration/testpackages/ace_order_overwrite.zip/META-INF/vault/filter.xml (added)
+++ jackrabbit/commons/filevault/trunk/vault-core/src/test/resources/org/apache/jackrabbit/vault/packaging/integration/testpackages/ace_order_overwrite.zip/META-INF/vault/filter.xml Wed Jun 20 02:07:44 2018
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ 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.
+  -->
+
+<workspaceFilter version="1.0">
+    <filter root="/testroot" mode="merge"/>
+</workspaceFilter>

Added: jackrabbit/commons/filevault/trunk/vault-core/src/test/resources/org/apache/jackrabbit/vault/packaging/integration/testpackages/ace_order_overwrite.zip/META-INF/vault/nodetypes.cnd
URL: http://svn.apache.org/viewvc/jackrabbit/commons/filevault/trunk/vault-core/src/test/resources/org/apache/jackrabbit/vault/packaging/integration/testpackages/ace_order_overwrite.zip/META-INF/vault/nodetypes.cnd?rev=1833885&view=auto
==============================================================================
--- jackrabbit/commons/filevault/trunk/vault-core/src/test/resources/org/apache/jackrabbit/vault/packaging/integration/testpackages/ace_order_overwrite.zip/META-INF/vault/nodetypes.cnd (added)
+++ jackrabbit/commons/filevault/trunk/vault-core/src/test/resources/org/apache/jackrabbit/vault/packaging/integration/testpackages/ace_order_overwrite.zip/META-INF/vault/nodetypes.cnd Wed Jun 20 02:07:44 2018
@@ -0,0 +1,8 @@
+<'sling'='http://sling.apache.org/jcr/sling/1.0'>
+<'nt'='http://www.jcp.org/jcr/nt/1.0'>
+
+[sling:Folder] > nt:folder
+  - * (undefined)
+  - * (undefined) multiple
+  + * (nt:base) = sling:Folder version
+

Added: jackrabbit/commons/filevault/trunk/vault-core/src/test/resources/org/apache/jackrabbit/vault/packaging/integration/testpackages/ace_order_overwrite.zip/META-INF/vault/properties.xml
URL: http://svn.apache.org/viewvc/jackrabbit/commons/filevault/trunk/vault-core/src/test/resources/org/apache/jackrabbit/vault/packaging/integration/testpackages/ace_order_overwrite.zip/META-INF/vault/properties.xml?rev=1833885&view=auto
==============================================================================
--- jackrabbit/commons/filevault/trunk/vault-core/src/test/resources/org/apache/jackrabbit/vault/packaging/integration/testpackages/ace_order_overwrite.zip/META-INF/vault/properties.xml (added)
+++ jackrabbit/commons/filevault/trunk/vault-core/src/test/resources/org/apache/jackrabbit/vault/packaging/integration/testpackages/ace_order_overwrite.zip/META-INF/vault/properties.xml Wed Jun 20 02:07:44 2018
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="utf-8" standalone="no"?>
+<!--
+  ~ 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.
+  -->
+
+<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
+<properties>
+<comment>FileVault Package Properties</comment>
+<entry key="createdBy">admin</entry>
+<entry key="name">mode_ac_test_a</entry>
+<entry key="lastModified">2011-11-15T09:43:22.972+01:00</entry>
+<entry key="lastModifiedBy">admin</entry>
+<entry key="created">2011-11-15T09:43:22.993+01:00</entry>
+<entry key="buildCount">1</entry>
+<entry key="version"/>
+<entry key="dependencies"/>
+<entry key="packageFormatVersion">2</entry>
+<entry key="description"/>
+<entry key="lastWrapped">2011-11-15T09:43:22.972+01:00</entry>
+<entry key="group"/>
+<entry key="lastWrappedBy">admin</entry>
+<entry key="acHandling">overwrite</entry>
+</properties>

Added: jackrabbit/commons/filevault/trunk/vault-core/src/test/resources/org/apache/jackrabbit/vault/packaging/integration/testpackages/ace_order_overwrite.zip/jcr_root/.content.xml
URL: http://svn.apache.org/viewvc/jackrabbit/commons/filevault/trunk/vault-core/src/test/resources/org/apache/jackrabbit/vault/packaging/integration/testpackages/ace_order_overwrite.zip/jcr_root/.content.xml?rev=1833885&view=auto
==============================================================================
--- jackrabbit/commons/filevault/trunk/vault-core/src/test/resources/org/apache/jackrabbit/vault/packaging/integration/testpackages/ace_order_overwrite.zip/jcr_root/.content.xml (added)
+++ jackrabbit/commons/filevault/trunk/vault-core/src/test/resources/org/apache/jackrabbit/vault/packaging/integration/testpackages/ace_order_overwrite.zip/jcr_root/.content.xml Wed Jun 20 02:07:44 2018
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ 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.
+  -->
+
+<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:rep="internal"
+    jcr:mixinTypes="[rep:AccessControllable]"
+    jcr:primaryType="rep:root"
+    sling:resourceType="sling:redirect"
+    sling:target="/index.html">
+    <rep:policy/>
+    <jcr:system/>
+    <var/>
+    <libs/>
+    <etc/>
+    <apps/>
+    <content/>
+    <tmp/>
+    <home/>
+    <testroot/>
+</jcr:root>

Added: jackrabbit/commons/filevault/trunk/vault-core/src/test/resources/org/apache/jackrabbit/vault/packaging/integration/testpackages/ace_order_overwrite.zip/jcr_root/testroot/secured/.content.xml
URL: http://svn.apache.org/viewvc/jackrabbit/commons/filevault/trunk/vault-core/src/test/resources/org/apache/jackrabbit/vault/packaging/integration/testpackages/ace_order_overwrite.zip/jcr_root/testroot/secured/.content.xml?rev=1833885&view=auto
==============================================================================
--- jackrabbit/commons/filevault/trunk/vault-core/src/test/resources/org/apache/jackrabbit/vault/packaging/integration/testpackages/ace_order_overwrite.zip/jcr_root/testroot/secured/.content.xml (added)
+++ jackrabbit/commons/filevault/trunk/vault-core/src/test/resources/org/apache/jackrabbit/vault/packaging/integration/testpackages/ace_order_overwrite.zip/jcr_root/testroot/secured/.content.xml Wed Jun 20 02:07:44 2018
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ 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.
+  -->
+
+<jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0" xmlns:rep="internal"
+    jcr:mixinTypes="[rep:AccessControllable]"
+    jcr:primaryType="nt:folder"/>

Added: jackrabbit/commons/filevault/trunk/vault-core/src/test/resources/org/apache/jackrabbit/vault/packaging/integration/testpackages/ace_order_overwrite.zip/jcr_root/testroot/secured/_rep_policy.xml
URL: http://svn.apache.org/viewvc/jackrabbit/commons/filevault/trunk/vault-core/src/test/resources/org/apache/jackrabbit/vault/packaging/integration/testpackages/ace_order_overwrite.zip/jcr_root/testroot/secured/_rep_policy.xml?rev=1833885&view=auto
==============================================================================
--- jackrabbit/commons/filevault/trunk/vault-core/src/test/resources/org/apache/jackrabbit/vault/packaging/integration/testpackages/ace_order_overwrite.zip/jcr_root/testroot/secured/_rep_policy.xml (added)
+++ jackrabbit/commons/filevault/trunk/vault-core/src/test/resources/org/apache/jackrabbit/vault/packaging/integration/testpackages/ace_order_overwrite.zip/jcr_root/testroot/secured/_rep_policy.xml Wed Jun 20 02:07:44 2018
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ 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.
+  -->
+
+<jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:rep="internal"
+    jcr:primaryType="rep:ACL">
+    <allow
+        jcr:primaryType="rep:GrantACE"
+        rep:principalName="everyone"
+        rep:privileges="{Name}[jcr:write]">
+        <rep:restrictions
+            jcr:primaryType="rep:Restrictions"
+            rep:glob="/foo"/>
+    </allow>
+    <deny1
+        jcr:primaryType="rep:DenyACE"
+        rep:principalName="testuser"
+        rep:privileges="{Name}[jcr:write]">
+        <rep:restrictions
+            jcr:primaryType="rep:Restrictions"
+            rep:glob="/foo"/>
+    </deny1>
+    <allow2
+        jcr:primaryType="rep:GrantACE"
+        rep:principalName="everyone"
+        rep:privileges="{Name}[jcr:write]">
+        <rep:restrictions
+            jcr:primaryType="rep:Restrictions"
+            rep:glob="/bar"/>
+    </allow2>
+</jcr:root>