jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Seidel. Robert" <Robert.Sei...@aeb.de>
Subject AW: AW: New information about my last email...
Date Wed, 26 Jan 2011 10:43:38 GMT
Hi javier,

if a policy is already set to a node, getApplicablePolicies is empty. You have to use getPolicies
instead. 

I don't like it...

Regards, Robert ;)

-----Urspr√ľngliche Nachricht-----
Von: Angela Schreiber [mailto:anchela@adobe.com] 
Gesendet: Mittwoch, 26. Januar 2011 11:36
An: users@jackrabbit.apache.org
Betreff: Re: AW: New information about my last email...

hi javier

> the problem is when I call:
> AccessControlPolicyIterator it = (AccessControlPolicyIterator)
> acm.getApplicablePolicies(node.getPath());
>
> if (it.hasNext())
> ....
>
> the function it.hasNext() returns always false. I do not understand
> why.
> Do you know what is happening?

i can only guess...

a) there is no additional policy to be applied because you already
    set all applicable policies before.
    in this case AccessControlManager#getPolicies would expose the
    policies set before. if any of them is the ACL you are looking for
    you can modify it and reapply it by calling acmgr#setPolicy() and
    a subsequest session.save.

b) there are no applicable policies at all... in this case the
    AccessControlProvider of your workspace was configured to something
    else than you are expecting it to be...
    in this case i would take a look at the workspace security
    configuration or - in debug mode - what the nature of your
    access control provider was.

c) everything is configured properly but the node you are looking
    at doesn't allow to be access controlled for whatever reasons
    (although that should rather result in an exception)...

since i assume that you are using some default jackrabbit setup
and based on the code you sent my first guess would be: a)

regards
angela
Mime
View raw message