jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aimran <aimra...@gmail.com>
Subject Help with JCR 2 access control
Date Wed, 01 Sep 2010 18:25:10 GMT

It seems, there is very sparse information about one of the key features
[access control] of Jackrabbit 2. I started with the expectation that
setting policies should be easy, but after browsing through the lists and
documentation, I am still pounding my head.

So, I use start a repository and want to set access control on a node so
that some users can view it and some cannot. 

My repository.xml has the security configuration:
<SecurityManager class="org.apache.jackrabbit.core.DefaultSecurityManager"



The code that tests the access control capability:
Session session = null;
        try {
            session = Main.getInstance().getSession("admin",
"admin","default");//get session to the default workspace
            Node n = session.getRootNode().addNode("base");
            //Main.getInstance().createWorkSpace(session, "community1",
        } catch (Exception ex) {
            // ex.printStackTrace();
            System.out.println("EXPN1:" + ex);

The getApplicablePolicies return 0. So how do I set access control on  the

The printing of the root node looks like this:
[/(jcr:primaryType = rep:root)]
[/base(jcr:primaryType = nt:unstructured)]

I must surely be missing something very obvious.
View this message in context: http://jackrabbit.510166.n4.nabble.com/Help-with-JCR-2-access-control-tp2403697p2403697.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.

View raw message