jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ulrich <For...@gombers.de>
Subject Re: How to get the effective ACL for a given node
Date Fri, 12 Jul 2013 10:06:27 GMT
For starting with this stuff I'm running a non customized
jackrabbit-standalone-jar. Does your question mean, their are other
opportunities to protect nodes than by ACLs?.
I used the sample from the wiki because it looks quite official, as it's linked
from the jackrabbit homepage. Beside this I didn't find anything else about this
subject.
Do you know where I might read more?

brgds,
Ulrich

> Angela Schreiber <anchela@adobe.com> hat am 12. Juli 2013 um 09:34
> geschrieben:
>
>
> hi ulrich
>
> i don't know what's written on that wiki page. but i would suggest you
> take a quick look at your repository configuration. which security manager
> do you have in place?
> my first guess, would be that this is the reason for the
> UnsupportedRepositoryOperationException.
>
> kind regards
> angela
>
>
>
> On 7/12/13 8:19 AM, "Ulrich" <Forums@gombers.de> wrote:
>
> >Have now tried to implement the AccessControlManager - but fail right
> >away.
> >        private static void checkPolicy(String nodename) throws
> >RepositoryException {
> >                AccessControlManager acm =
> >session.getAccessControlManager();
> >                AccessControlPolicy[] acps =
> >acm.getEffectivePolicies(nodename);
> >                for (AccessControlPolicy acp : acps) {
> >                        AccessControlList acl = (AccessControlList)acp;
> >                        for (AccessControlEntry ace :
> >acl.getAccessControlEntries()) {
> >                            LOGGER.info("ACE: {}", ace.getPrincipal());
> >                        }
> >                }
> >        }
> >
> >I built this code based on the sample described in
> >"http://wiki.apache.org/jackrabbit/AccessControl". But I don't get beyond
> >the
> >line
> >          "AccessControlManager acm =  session.getAccessControlManager();"
> >it fails with:
> >Exception in thread "main"
> >javax.jcr.UnsupportedRepositoryOperationException:
> >JCR-1104
> >        at
> >org.apache.jackrabbit.jcr2spi.SessionImpl.getAccessControlManager(SessionI
> >mpl.java:501)
> >        at
> >com.lsy.webcc.samples.acls.TestAccessControlManager.checkPolicy(TestAccess
> >ControlManager.java:109)
> >        at
> >com.lsy.webcc.samples.acls.TestAccessControlManager.<init>(TestAccessContr
> >olManager.java:102)
> >        at
> >com.lsy.webcc.samples.acls.TestAccessControlManager.main(TestAccessControl
> >Manager.java:162)
> >
> >My program runs with jackrabbit-standalone-2.7.0.jar.
> >
> >brgds,
> >Ulrich
>

Mime
View raw message