jackrabbit-oak-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "angela (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (OAK-3775) Inconsistency between Node.getPrimaryType and Node.isNodeType
Date Tue, 15 Dec 2015 14:02:46 GMT

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

angela edited comment on OAK-3775 at 12/15/15 2:01 PM:
-------------------------------------------------------

proposed patch to address the issue including test-cases (which also spotted an issue with
2 of the shortcuts present in {{EffectiveNodeTypeManager.isNodeType(Tree, String)}}). Since
that method is used in other places as well, I would suggest to introduce a variant of the
method that takes the primary and mixin type names. 

[~mduerig], would it be possible for you to review my patch? I run the trunk build with ITs
and didn't spot any regressions up to now.


was (Author: anchela):
proposed patch to address the issue including test-cases (which also spotted an issue with
2 of the shortcuts present in {{EffectiveNodeTypeManager.isNodeType(Tree, String)}}). Since
that method is used in other places as well, I would suggest to introduce a variant of the
method that takes the primary and mixin type names.

[~mduerig], would it be possible for you to review my patch? 

>  Inconsistency between Node.getPrimaryType and Node.isNodeType
> --------------------------------------------------------------
>
>                 Key: OAK-3775
>                 URL: https://issues.apache.org/jira/browse/OAK-3775
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: jcr
>            Reporter: Amrit Verma
>            Assignee: angela
>             Fix For: 1.3.13
>
>         Attachments: OAK-3775.patch
>
>
> Steps:
> 1. Create a node structure say /node1/node2 (node2 should be nt:hierarchyNode type node)
> 2. Create a testuser and grant read permission on whole repository.
> 3. Grant permission jcr:read to testuser on node2.
> 3. On node2, deny jcr:read to testuser with rep:glob=/*
> Execute the following from testuser's session:
> * {{node.getPrimaryNodeType().isNodeType(JcrConstants.NT_HIERARCHYNODE)}}
> * {{node.isNodeType(JcrConstants.NT_HIERARCHYNODE)}}
> where node refers to node2 created above. The first expression returns true but the second
returns false. 
> Expected: both should return true.



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

Mime
View raw message