Skip to content

Commit 656a321

Browse files
committed
modify post filter handling to completely ignore artifacts not neither
ancestor of a filter nor contained in it
1 parent 2dea102 commit 656a321

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

vault-core/src/main/java/org/apache/jackrabbit/vault/fs/io/Importer.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -529,10 +529,7 @@ public void run(Archive archive, Session session, String parentPath)
529529
*/
530530
private TxInfo postFilter(TxInfo root) {
531531
TxInfo modifierRoot = root;
532-
if (filter.contains(modifierRoot.path)){
533-
return modifierRoot;
534-
}
535-
if (filter.isAncestor(modifierRoot.path)) {
532+
if (filter.isAncestor(modifierRoot.path) || filter.contains(modifierRoot.path)) {
536533
for (String k : modifierRoot.children().keySet()) {
537534
TxInfo child = modifierRoot.children().get(k);
538535
modifierRoot.children().put(k, postFilter(child));

vault-core/src/test/java/org/apache/jackrabbit/vault/packaging/integration/ACLAndMergeIT.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -482,6 +482,6 @@ public void testACLsOutsideFilter() throws IOException, PackageException, Reposi
482482
assertPermissionMissing("/testroot", false, new String[]{"jcr:all"}, "everyone", null);
483483

484484
// this is not contained in the filter root but installed nevertheless (due to ancestor being a filter root)
485-
assertPermission("/testroot/secured", false, new String[]{"jcr:all"}, "everyone", null);
485+
assertPermissionMissing("/testroot/secured", false, new String[]{"jcr:all"}, "everyone", null);
486486
}
487487
}

0 commit comments

Comments
 (0)