jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xiaohua lu <xilu1...@yahoo.com>
Subject Jackrabbit access manager question
Date Thu, 01 Mar 2007 17:03:25 GMT
<!-- DIV {margin:0px;}-->Hi,
We are working on a prototype based on Jackrabbit and encoutered some problems with access

The use case we have is we are trying to create a node with some properties, the code looks
like this 

      javax.jcr.Node newJCRNode = node.addNode(relPath, primaryNodeTypeName);
      newJCRNode.setProperty(propName, propValue);

noticed that after we hookup the access manager, the setProperty always
failed, The way our access manager works is we will do a repository
lookup of the node  by uuid (if it is a property, we will check the
parent node id), and depending on the path of the node, we decide if
the current user has permission or not. The failure of setProperty is
due to denial of access on its parent node newJCRNode. Since it has not
been saved to repository yet, we can't resolve the path through
repository lookup by uuid (we also tried HierachyManager and it can't
resolve the path as well)

was wondering if the permission check should be done before the save is
called. Also I would like to know any workaround to this problem. 




Caused by: javax.jcr.ItemNotFoundException: {http://abc.com/acr/1.0}name
	at org.apache.jackrabbit.core.NodeImpl.getOrCreateProperty(NodeImpl.java:453)
	at org.apache.jackrabbit.core.NodeImpl.getOrCreateProperty(NodeImpl.java:407)
	at org.apache.jackrabbit.core.NodeImpl.setProperty(NodeImpl.java:2218)

We won't tell. Get more on shows you hate to love 
(and love to hate): Yahoo! TV's Guilty Pleasures list.
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message