jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Angela Schreiber <anch...@day.com>
Subject Re: Jackrabbit Security: Creating acNode under "rep:accesscontrol" for a new Principal
Date Tue, 09 Mar 2010 08:17:14 GMT
hi kishore

> How can I create acNodes for these new Principals?

those nodes are automatically created. you should not
create (or try to create) them 'manually'.

try:
JackrabbitAccessControlManager#getApplicablePolicies(Principal)

to edit an existing policy:
JackrabbitAccessControlManager#getPolicies(Principal)

instead.
the following steps are with regular JSR 283 access control mangement:

1) apply the policy using AccessControlManager#setPolicy where
    the path is obtained from the JackrabbitAccessControlPolicy
and
2) persist changes with Session.save().

the test-cases for the principal-based ac may give you
an example:
org.apache.jackrabbit.core.security.authorization.principalbased

hope that helps
angela

Mime
View raw message