-
Notifications
You must be signed in to change notification settings - Fork 73
JCRVLT-810 skip filter validation #378
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
joerghoh
wants to merge
11
commits into
master
Choose a base branch
from
JCRVLT-810
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
ba52eff
JCRVLT-810 initial approach
joerghoh 13245e5
JCRVLT-810 add integration tests
joerghoh 0216501
add failing test
joerghoh a0d6f3a
Merge branch 'master' into JCRVLT-810
joerghoh f032f82
JCRVLT-810 move the check to the DocViewImporter
joerghoh d8faa69
improve javadoc
joerghoh 71d7eb6
skip checks on more occassions of importing a package
joerghoh e712424
JCRVLT-810 use a non-binary package for test-content
joerghoh 737ae4b
Update vault-core/src/main/java/org/apache/jackrabbit/vault/fs/io/Imp…
joerghoh abe7a41
PR feedback
joerghoh e16806c
Update vault-core/src/main/java/org/apache/jackrabbit/vault/fs/io/Imp…
joerghoh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
...tegration-tests/src/main/resources/test-packages/outside-filters.zip/META-INF/MANIFEST.MF
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Manifest-Version: 1.0 | ||
Created-By: 11.0.21 (Eclipse Adoptium) | ||
|
77 changes: 77 additions & 0 deletions
77
...tion-tests/src/main/resources/test-packages/outside-filters.zip/META-INF/vault/config.xml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
<vaultfs version="1.1"> | ||
<!-- | ||
Defines the content aggregation. The order of the defined aggregates | ||
is important for finding the correct aggregator. | ||
--> | ||
<aggregates> | ||
<!-- | ||
Defines an aggregate that handles nt:file and nt:resource nodes. | ||
--> | ||
<aggregate type="file" title="File Aggregate"/> | ||
|
||
<!-- | ||
Defines an aggregate that handles file/folder like nodes. It matches | ||
all nt:hierarchyNode nodes that have or define a jcr:content | ||
child node and excludes child nodes that are nt:hierarchyNodes. | ||
--> | ||
<aggregate type="filefolder" title="File/Folder Aggregate"/> | ||
|
||
<!-- | ||
Defines an aggregate that handles nt:nodeType nodes and serializes | ||
them into .cnd notation. | ||
--> | ||
<aggregate type="nodetype" title="Node Type Aggregate" /> | ||
|
||
<!-- | ||
Defines an aggregate that defines full coverage for certain node | ||
types that cannot be covered by the default aggregator. | ||
--> | ||
<aggregate type="full" title="Full Coverage Aggregate"> | ||
<matches> | ||
<include nodeType="rep:AccessControl" respectSupertype="true" /> | ||
<include nodeType="rep:Policy" respectSupertype="true" /> | ||
<include nodeType="cq:Widget" respectSupertype="true" /> | ||
<include nodeType="cq:EditConfig" respectSupertype="true" /> | ||
<include nodeType="cq:WorkflowModel" respectSupertype="true" /> | ||
<include nodeType="vlt:FullCoverage" respectSupertype="true" /> | ||
<include nodeType="mix:language" respectSupertype="true" /> | ||
<include nodeType="sling:OsgiConfig" respectSupertype="true" /> | ||
</matches> | ||
</aggregate> | ||
|
||
<!-- | ||
Defines an aggregate that handles nt:folder like nodes. | ||
--> | ||
<aggregate type="generic" title="Folder Aggregate"> | ||
<matches> | ||
<include nodeType="nt:folder" respectSupertype="true" /> | ||
</matches> | ||
<contains> | ||
<exclude isNode="true" /> | ||
</contains> | ||
</aggregate> | ||
|
||
<!-- | ||
Defines the default aggregate | ||
--> | ||
<aggregate type="generic" title="Default Aggregator" isDefault="true"> | ||
<matches> | ||
<!-- all --> | ||
</matches> | ||
<contains> | ||
<exclude nodeType="nt:hierarchyNode" respectSupertype="true" /> | ||
</contains> | ||
</aggregate> | ||
|
||
</aggregates> | ||
|
||
<!-- | ||
defines the input handlers | ||
--> | ||
<handlers> | ||
<handler type="folder"/> | ||
<handler type="file"/> | ||
<handler type="nodetype"/> | ||
<handler type="generic"/> | ||
</handlers> | ||
</vaultfs> |
25 changes: 25 additions & 0 deletions
25
...c/main/resources/test-packages/outside-filters.zip/META-INF/vault/definition/.content.xml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<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}2011-06-07T14:31:49.179-07:00" | ||
jcr:createdBy="admin" | ||
jcr:description="" | ||
jcr:lastModified="{Date}2011-06-07T14:31:49.179-07:00" | ||
jcr:lastModifiedBy="admin" | ||
jcr:primaryType="vlt:PackageDefinition" | ||
buildCount="1" | ||
cqVersion="5.3" | ||
group="my_packages" | ||
lastUnwrapped="{Date}2011-06-07T14:31:49.179-07:00" | ||
lastUnwrappedBy="admin" | ||
lastWrapped="{Date}2011-06-07T14:31:49.179-07:00" | ||
lastWrappedBy="admin" | ||
name="tmp" | ||
version=""> | ||
<filter jcr:primaryType="nt:unstructured"> | ||
<f0 | ||
jcr:primaryType="nt:unstructured" | ||
mode="replace" | ||
root="/tmp" | ||
rules="[]"/> | ||
</filter> | ||
</jcr:root> |
6 changes: 6 additions & 0 deletions
6
...tion-tests/src/main/resources/test-packages/outside-filters.zip/META-INF/vault/filter.xml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<workspaceFilter version="1.0"> | ||
<filter root="/tmp"> | ||
<exclude pattern="^.*/excludedProp.*" matchProperties="true"/> | ||
</filter> | ||
</workspaceFilter> |
12 changes: 12 additions & 0 deletions
12
...n-tests/src/main/resources/test-packages/outside-filters.zip/META-INF/vault/nodetypes.cnd
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<'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 | ||
|
||
[sling:OrderedFolder] > sling:Folder | ||
orderable | ||
+ * (nt:base) = sling:OrderedFolder version | ||
|
19 changes: 19 additions & 0 deletions
19
...-tests/src/main/resources/test-packages/outside-filters.zip/META-INF/vault/properties.xml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?xml version="1.0" encoding="utf-8" standalone="no"?> | ||
<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"> | ||
<properties> | ||
<comment>FileVault Package Properties</comment> | ||
<entry key="createdBy">admin</entry> | ||
<entry key="name">tmp</entry> | ||
<entry key="lastModified">2011-06-07T14:31:49.179-07:00</entry> | ||
<entry key="lastModifiedBy">admin</entry> | ||
<entry key="created">2011-06-07T14:31:49.418-07:00</entry> | ||
<entry key="buildCount">1</entry> | ||
<entry key="version"/> | ||
<entry key="dependencies"/> | ||
<entry key="packageFormatVersion">2</entry> | ||
<entry key="description"/> | ||
<entry key="group">my_packages</entry> | ||
<entry key="lastWrapped">2011-06-07T14:31:49.179-07:00</entry> | ||
<entry key="lastWrappedBy">admin</entry> | ||
<entry key="path">/etc/packages/my_packages/tmp</entry> | ||
</properties> |
16 changes: 16 additions & 0 deletions
16
...egration-tests/src/main/resources/test-packages/outside-filters.zip/jcr_root/.content.xml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<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="/welcome.html"> | ||
<home/> | ||
<rep:policy/> | ||
<jcr:system/> | ||
<etc/> | ||
<apps/> | ||
<libs/> | ||
<content/> | ||
<var/> | ||
<tmp/> | ||
</jcr:root> |
5 changes: 5 additions & 0 deletions
5
...tion-tests/src/main/resources/test-packages/outside-filters.zip/jcr_root/tmp/.content.xml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" | ||
jcr:primaryType="sling:OrderedFolder"> | ||
<foo/> | ||
</jcr:root> |
5 changes: 5 additions & 0 deletions
5
...-tests/src/main/resources/test-packages/outside-filters.zip/jcr_root/tmp/foo/.content.xml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" | ||
jcr:primaryType="sling:OrderedFolder"> | ||
<bar/> | ||
</jcr:root> |
5 changes: 5 additions & 0 deletions
5
...ts/src/main/resources/test-packages/outside-filters.zip/jcr_root/tmp/foo/bar/.content.xml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" | ||
jcr:primaryType="sling:OrderedFolder"> | ||
<tobi/> | ||
</jcr:root> |
5 changes: 5 additions & 0 deletions
5
...c/main/resources/test-packages/outside-filters.zip/jcr_root/tmp/foo/bar/tobi/.content.xml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" | ||
jcr:primaryType="sling:OrderedFolder" | ||
excludedProp="excluded property" | ||
/> |
Binary file not shown.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add some assertions what happens to nodes/properties below filter roots not contained in the package.