jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "angela (JIRA)" <j...@apache.org>
Subject [jira] Commented: (JCR-1639) Setting AccessControlEntry on a versioned Node throws exception
Date Thu, 05 Jun 2008 15:11:45 GMT

    [ https://issues.apache.org/jira/browse/JCR-1639?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12602675#action_12602675
] 

angela commented on JCR-1639:
-----------------------------

> So just to be clear my use case of access control on versioned nodes is invalid? 
> Or the manner in which I'm trying to accomplish it invalid? 

a checked in node is read only. once it is checked out the read-only status is lifted and
any kind of write operations may be executed on the node again.

> 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.


Mime
View raw message