jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jukka Zitting (JIRA)" <j...@apache.org>
Subject [jira] Updated: (JCR-1941) AccessManager asks for property (jcr:created) permissions before the actual creation of the object
Date Wed, 11 Feb 2009 13:25:02 GMT

     [ https://issues.apache.org/jira/browse/JCR-1941?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Jukka Zitting updated JCR-1941:
-------------------------------

    Fix Version/s:     (was: 1.6.0)
                   1.5.3

Merged to the 1.5 branch in revision 743334.

> AccessManager asks for property (jcr:created) permissions before the actual creation
of the object
> --------------------------------------------------------------------------------------------------
>
>                 Key: JCR-1941
>                 URL: https://issues.apache.org/jira/browse/JCR-1941
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-core
>    Affects Versions: 1.5.0
>         Environment: n/a
>            Reporter: Jacco van Weert
>            Assignee: angela
>             Fix For: 1.5.3
>
>
> When implementing a custom AccessManager for Jackrabbit v1.5+ there a bug when creating
a new object.
> I perform an addNode() and my own accessmanager the isGranted() method is override'd
and performs the following code;
>             ......
>             String perm = null;
>             NodeId     nodeId = mHierMgr.resolveNodePath( pPath );
>             PropertyId propId = null;
>             if (nodeId==null) {
>               propId = mHierMgr.resolvePropertyPath( pPath );
>      System.out.println("path = " + pPath.toString() );
>               // **** TODO is this ok?... it happens when a new object is created and
the accessmanager ask for read access on a property.
> //              if (propId==null) return true;
>               nodeId = propId.getParentId();
>             }
> this is the System.out.println result
> path = {}        {}JeCARS        {}default        {}Groups        {}testGroup       
{http://www.jcp.org/jcr/1.0}created
> and the stacktrace
> 	at org.jecars.CARS_AccessManager.isGranted(CARS_AccessManager.java:844)
> 	at org.jecars.CARS_AccessManager.isGranted(CARS_AccessManager.java:806)
> 	at org.apache.jackrabbit.core.ItemManager.canRead(ItemManager.java:339)
> 	at org.apache.jackrabbit.core.ItemManager.canRead(ItemManager.java:326)
> 	at org.apache.jackrabbit.core.ItemManager.createItemData(ItemManager.java:696)
> 	at org.apache.jackrabbit.core.ItemManager.getItemData(ItemManager.java:291)
> 	at org.apache.jackrabbit.core.ItemManager.getItem(ItemManager.java:228)
> 	at org.apache.jackrabbit.core.ItemManager.getItem(ItemManager.java:493)
> 	at org.apache.jackrabbit.core.NodeImpl.createChildProperty(NodeImpl.java:479)
> 	at org.apache.jackrabbit.core.NodeImpl.createChildNode(NodeImpl.java:535)
> 	at org.apache.jackrabbit.core.NodeImpl.internalAddChildNode(NodeImpl.java:795)
> 	at org.apache.jackrabbit.core.NodeImpl.internalAddNode(NodeImpl.java:729)
> 	at org.apache.jackrabbit.core.NodeImpl.internalAddNode(NodeImpl.java:677)
> 	at org.apache.jackrabbit.core.NodeImpl.addNode(NodeImpl.java:2110)
> It seems that READ permission for the jcr:created property is requested before the object
is actually created

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message