You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "angela (JIRA)" <ji...@apache.org> on 2008/06/05 09:03:45 UTC
[jira] Resolved: (JCR-1639) Setting AccessControlEntry on a
versioned Node throws exception
[ https://issues.apache.org/jira/browse/JCR-1639?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
angela resolved JCR-1639.
-------------------------
Resolution: Invalid
> AccessControlEntry entry = manager.addAccessControlEntry(fooNode.getPath(), principal,
privs);
> Caused by: javax.jcr.version.VersionException: /cerner/foo: cannot add a mixin node type to
> a checked-in node
> It has to do with the fact inside ACLEditor.createACLNode(...) it doesn't checkout the node
> before trying to add the new mixin type of NT_REP_ACCESS_CONTROLLABLE.
yes, it doesn't checkout the node.
access control modifications are considered transient modifications to the node at 'absPath' and a checked-in node is defined to be read-only. therefore i would argue that this is the expected behaviour. i will add some test-cases for that... that's actually missing.
> Setting AccessControlEntry on a versioned Node throws exception
> ---------------------------------------------------------------
>
> Key: JCR-1639
> URL: https://issues.apache.org/jira/browse/JCR-1639
> Project: Jackrabbit
> Issue Type: Bug
> Affects Versions: 1.5
> Environment: windows vista jdk1.5.0_11
> Reporter: Micah Whitacre
>
> I realized the code is in flux and not released but I figured I'd log a bug anyway to track the issue:
> I have a repository where every node has the mixin type of "mix:versionable". My repository.xml is setup to use the DefaultAccessManager and when I try to make the following call:
> AccessControlManager manager = sessionImpl.getAccessControlManager();
> Privilege[] privs = new Privilege[] { PrivilegeRegistry.WRITE_PRIVILEGE };
> AccessControlEntry entry = manager.addAccessControlEntry(fooNode.getPath(), principal,
> privs);
> sessionImpl.save();
> on that node it throws the following exception:
> Caused by: javax.jcr.version.VersionException: /cerner/foo: cannot add a mixin node type to a checked-in node
> at org.apache.jackrabbit.core.NodeImpl.addMixin(NodeImpl.java:1024)
> at org.apache.jackrabbit.core.security.authorization.acl.ACLEditor.createAclNode(ACLEditor.java:299)
> at org.apache.jackrabbit.core.security.authorization.acl.ACLEditor.setPolicyTemplate(ACLEditor.java:131)
> at org.apache.jackrabbit.core.security.authorization.acl.ACLEditor.addAccessControlEntry(ACLEditor.java:214)
> at org.apache.jackrabbit.core.security.DefaultAccessManager.addAccessControlEntry(DefaultAccessManager.java:389)
> It has to do with the fact inside ACLEditor.createACLNode(...) it doesn't checkout the node before trying to add the new mixin type of NT_REP_ACCESS_CONTROLLABLE.
> I'll work on craating a test case that will generate the stack trace.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.