jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Angela Schreiber <anch...@adobe.com>
Subject Re: How to get the effective ACL for a given node
Date Fri, 12 Jul 2013 07:34:49 GMT
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