You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "Julian Reschke (JIRA)" <ji...@apache.org> on 2016/11/10 13:03:58 UTC
[jira] [Comment Edited] (JCR-3987) jackrabbit-jcr-commons
JcrUtils.getOrCreateByPath fails if session is not allowed to read root
[ https://issues.apache.org/jira/browse/JCR-3987?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15361311#comment-15361311 ]
Julian Reschke edited comment on JCR-3987 at 11/10/16 1:03 PM:
---------------------------------------------------------------
trunk: [r1751279|http://svn.apache.org/r1751279]
2.12: [r1751288|http://svn.apache.org/r1751288]
2.10: [r1751291|http://svn.apache.org/r1751291]
2.8: [r1769107|http://svn.apache.org/r1769107]
was (Author: reschke):
trunk: [r1751279|http://svn.apache.org/r1751279]
2.12: [r1751288|http://svn.apache.org/r1751288]
2.10: [r1751291|http://svn.apache.org/r1751291]
> jackrabbit-jcr-commons JcrUtils.getOrCreateByPath fails if session is not allowed to read root
> ----------------------------------------------------------------------------------------------
>
> Key: JCR-3987
> URL: https://issues.apache.org/jira/browse/JCR-3987
> Project: Jackrabbit Content Repository
> Issue Type: Bug
> Components: jackrabbit-jcr-commons
> Affects Versions: 2.4.5, 2.6.5, 2.8.1, 2.10.3, 2.12.2
> Reporter: Carsten Ziegeler
> Assignee: Julian Reschke
> Fix For: 2.13.0, 2.12.3, 2.10.4, 2.8.4, 2.14
>
> Attachments: patch.txt
>
>
> JcrUtils.getOrCreateByPath starts to try to find the node from the root down to the specified path, therefore if the current session has not access to "/", it fails. JcrUtils.getOrCreateByPath must try the longest path first and then reduce it until it finds an accessible node. So for example if the input is "/a/b/c" instead of testing for "/", "/a", "/a/b" .. it should test /a/b/c, /a/b, /a and then /
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)