[ 
https://issues.apache.org/jira/browse/OAK-2810?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14660356#comment-14660356
 ] 

Fernando Lemes commented on OAK-2810:
-------------------------------------

[~anchela], on BatchedItemOperations class at jackrabbit-core module there is 
just a check for read access on the source node (not the parent).

At method: public NodeId copy(Path srcPath, ItemStateManager srcStateMgr, 
HierarchyManager srcHierMgr, AccessManager srcAccessMgr, Path destPath, int 
flag)
there are these lines:
if (!srcAccessMgr.isGranted(srcPath, Permission.READ)) {
    throw new PathNotFoundException(safeGetJCRPath(srcPath));
}

(In the project I'm currently working, we have two flavors for deployment, one 
with Jackrabbit 2.8.0 and the other with Oak Jackrabbit 1.2.2. The functional 
tests were failing on the Oak flavor before I did a patch on that mentioned 
line.)

> Cannot copy a node from a protected parent
> ------------------------------------------
>
>                 Key: OAK-2810
>                 URL: https://issues.apache.org/jira/browse/OAK-2810
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: jcr
>    Affects Versions: 1.1.8
>            Reporter: Fernando Lemes
>              Labels: easytest, patch-available
>         Attachments: patch_to_CopyTest_file.patch
>
>
> If we try to copy a node, in which we have full access, but with no access on 
> the parent node, the copy operation will throw a PathNotFoundException when 
> evaluating checkProtectedNode(getParentPath("sourceNodePath")) on the copy() 
> method from org.apache.jackrabbit.oak.jcr.session.WorkspaceImpl



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to