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:[email protected]] Gesendet: Mittwoch, 26. Januar 2011 11:36 An: [email protected] 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
