You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Diego Ampudia Ortega <da...@tecsisa.com> on 2009/04/23 17:59:14 UTC
Problem with jackrabbit user deletion
Trying to delete an user from the repository, I´ve found that, if there are ACE´s associating the user and a jcr node, the user is deleted but the ACE´s aren´t, so when I try to get the ACL from the node, this exception is thrown:
org.apache.jackrabbit.api.security.principal.NoSuchPrincipalException: Unknown principal userName
at org.apache.jackrabbit.core.security.principal.PrincipalManagerImpl.getPrincipal(PrincipalManagerImpl.java:75)
at org.apache.jackrabbit.core.security.authorization.acl.ACLTemplate.<init>(ACLTemplate.java:108)
at org.apache.jackrabbit.core.security.authorization.acl.ACLEditor.getACL(ACLEditor.java:85)
at org.apache.jackrabbit.core.security.authorization.acl.ACLEditor.editAccessControlPolicies(ACLEditor.java:117)
at org.apache.jackrabbit.core.security.DefaultAccessManager.getApplicablePolicies(DefaultAccessManager.java:327)
(here is where I invoke accessControlManager.getApplicablePolicies(resourcePath) to get the policies relative to the node referenced by resourcePath, and userName is the user I´ve just deleted).
Do you know any solution or workaround for this issue?
Thank you in advance.
D. Ampudia
PS: the version of JackRabbit I´m using is 1.5.0
Re: Problem with jackrabbit user deletion
Posted by Lars Michele <la...@tu-dortmund.de>.
Hi,
the problem seems to be fixed in the trunk, but is not part of the
current releases. Have a look at
http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authorization/acl/ACLTemplate.java?revision=713975&view=markup
Now a check is performed, if the principal is there, and if not, it is
created on the fly but not persisted, just to be able to load the ACL.
Regards,
Lars
Diego Ampudia Ortega schrieb:
> Trying to delete an user from the repository, I´ve found that, if there are ACE´s associating the user and a jcr node, the user is deleted but the ACE´s aren´t, so when I try to get the ACL from the node, this exception is thrown:
>
>
>
> org.apache.jackrabbit.api.security.principal.NoSuchPrincipalException: Unknown principal userName
>
> at org.apache.jackrabbit.core.security.principal.PrincipalManagerImpl.getPrincipal(PrincipalManagerImpl.java:75)
>
> at org.apache.jackrabbit.core.security.authorization.acl.ACLTemplate.<init>(ACLTemplate.java:108)
>
> at org.apache.jackrabbit.core.security.authorization.acl.ACLEditor.getACL(ACLEditor.java:85)
>
> at org.apache.jackrabbit.core.security.authorization.acl.ACLEditor.editAccessControlPolicies(ACLEditor.java:117)
>
> at org.apache.jackrabbit.core.security.DefaultAccessManager.getApplicablePolicies(DefaultAccessManager.java:327)
>
> (here is where I invoke accessControlManager.getApplicablePolicies(resourcePath) to get the policies relative to the node referenced by resourcePath, and userName is the user I´ve just deleted).
>
>
>
> Do you know any solution or workaround for this issue?
>
>
>
> Thank you in advance.
>
>
>
> D. Ampudia
>
>
>
> PS: the version of JackRabbit I´m using is 1.5.