jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stefan Guggisberg (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (JCR-792) after enabling access manager, I can't createNode and setProperty without a node.save in the middle
Date Thu, 15 Mar 2007 17:39:09 GMT

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

Stefan Guggisberg resolved JCR-792.

    Resolution: Cannot Reproduce

i am unfortunately unable to reproduce the issue you're describing.

here's what i did trying to reproduce it:

i added the following lines at the beginning of the
SimpleAccessManager#isGranted(ItemId, int) method:

       try {
           String path = PathFormat.format(hierMgr.getPath(id), nsResolver);
           System.out.println("checking permission on " + path);
       } catch (RepositoryException re) {
       } catch (NameException ne) {
           // erm

when i run the following code:

           Node foo = root.addNode("foo");
           foo.setProperty("bar", "blah blah");

i get the following console output:

checking permission on /
checking permission on /foo/bar
checking permission on /foo/jcr:primaryType

so everything seems to be working as expected. note that i
used the hierarchy manager passed in the AMContext object
on init() for resolving the paths. 

feel free to reopen this issue if you don't agree. however, 
you should provide detailed instructions how to reproduce
it, ideally by providing  a simple test case.

> after enabling access manager, I can't createNode and setProperty without a node.save
in the middle
> ---------------------------------------------------------------------------------------------------
>                 Key: JCR-792
>                 URL: https://issues.apache.org/jira/browse/JCR-792
>             Project: Jackrabbit
>          Issue Type: Bug
>          Components: security
>    Affects Versions: 1.2.3
>            Reporter: Xiaohua Lu
> I added my own access manager. after that I can't get the following code working 
> Node n = createNewNode(parentNode);
> n.setProperty();
> parentNode.save();
> It seems that setProperty will invoke access control check, but since the new node is
not in the repository yet, my access manager implementation won't be able to grant permission.
I also tried to use hierachyManager to get the path of the new node, it also returned null.

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

View raw message