[
https://issues.apache.org/jira/browse/SLING-10955?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17451862#comment-17451862
]
Bertrand Delacretaz commented on SLING-10955:
---------------------------------------------
Thanks for mentioning that, I wasn't aware of this {{rep:glob}} constraint.
IIUC, replacing {{rep:glob}} by {{example:restriction}} in these tests would
fix this?
The examples on the docs page are now generated from [the test
scenarios|https://github.com/apache/sling-org-apache-sling-repoinit-parser/tree/master/src/test/resources/testcases]
- but changing those is not a problem.
> RepoInit documentation contains confusing example for single-valued rep:glob
> restriction
> ----------------------------------------------------------------------------------------
>
> Key: SLING-10955
> URL: https://issues.apache.org/jira/browse/SLING-10955
> Project: Sling
> Issue Type: Bug
> Components: Repoinit
> Reporter: Angela Schreiber
> Priority: Major
>
> [~bdelacretaz], just came across the following examples on the documentation
> page for the Sling RepoInit feature at
> https://sling.apache.org/documentation/bundles/repository-initialization.html
> {code}
> # restrictions with glob patterns
> allow jcr:addChildNodes on /apps,/content
> restriction(rep:glob,/cat,/cat/,cat)
> allow jcr:addChildNodes on /apps,/content
> restriction(rep:glob,cat/,*,*cat)
> allow jcr:addChildNodes on /apps,/content
> restriction(rep:glob,/cat/*,*/cat,*cat/*)
> {code}
> the {{rep:glob}} restriction defined with Jackrabbit Oak is single-valued :)
> while i admit that this could just be viewed as a random, the fact that there
> is an restriction with the given name, might create a false impression and
> consumers of the documentation might actually believe this is valid.
> i would suggest to either use an arbitrary restriction name or if using
> rep:glob change the examples such that they would actually work in a setup
> based on Jackrabbit
--
This message was sent by Atlassian Jira
(v8.20.1#820001)