[
https://issues.apache.org/jira/browse/SLING-10955?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17451866#comment-17451866
]
Angela Schreiber commented on SLING-10955:
------------------------------------------
[~bdelacretaz], it depends on what the aim of the example is. looking at the
other usages of the 'restriction' clause they all refer to known multi-valued
restrictions. so, i might make sense to keep the rep:glob examples but change
them to singe-valued.
> 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)