jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ChadDavis <chadmichaelda...@gmail.com>
Subject Re: ACL and Version Control
Date Sat, 30 Jul 2011 23:24:40 GMT
On Wed, Jul 27, 2011 at 2:13 AM, Angela Schreiber <anchela@adobe.com> wrote:
> hi chad
>
>> I suppose this could be a bug in the davex remoting stack, on the
>> service side of the equation.
>
> could be. can you provide a test case that allows me to reproduce the
> problem? that would be helpful.

I've created a test case.  However, it's not such a simple thing.  My
unit test has to fire up the a remote server, running the
jackrabbit-webapp WAR, then set up the repo with the ACL for the user.
 It's far too much to paste on the list here.  I can send you my JUnit
test class if you like.  But here's the main snippet, slightly
pseudo-ized.

Assume:

1) user has jcr:all on node a
2) user has read only on jcr:system tree

Test Code:

		Node a = clientSession.getRootNode().getNode("a");
		Node b = myNode.addNode("b");
		b.addMixin("mix:versionable");
		clientSession.save();
		VersionManager versionManager =
clientSession.getWorkspace().getVersionManager();
		Version version = versionManager.checkin(b.getPath());

		//add a version label
		VersionHistory versionHistory = versionManager.getVersionHistory(b.getPath());
		String versionLabel = "Version One";
		boolean replaceLabelWithSameName = false;
		versionHistory.addVersionLabel(version.getName(), versionLabel,
replaceLabelWithSameName);
		clientSession.save();

RESULTS:

1) checkin succeeds
2)  addVersionLabel fails with AccessDeniedException

Mime
View raw message