jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Cech. Ulrich" <Ulrich.C...@aeb.de>
Subject AW: AW: UserManagement
Date Tue, 23 Feb 2010 09:45:37 GMT
Thanks for answering without Eclipse :-))

I tried to scan the Sling-Sourcecode for help, but the Sling-Code uses this snippet to compare
the new Passwort with the existent password, so this code should work somehow:

Value[] pwdProperty = ((User)auth).getProperty("rep:password");

I am logged in the repository with the default 'admin'-account, so I should have all neccessary
rights, but this code returned pwdProperty with "null".

AccessControlUtil deals with privileges on pathes, I don't find any helpful hint for the problem
with the user passwords.

Ok, if "rep:password" is protected, than you will be right, that this doesn't work in a findAuthorizables()
If my further problem with the properties of an authorizables is fixed, then I can find another
property for getting all registered users in the repository, but as long as these methods
only return empty lists, that would be difficult ;-)

I searched the net, but to this topic there is really a big lack of documentation. If I managed
all these problems, I would like to write all these answers in the wiki or make some tutorial
on this.

Perhaps you have some hint later (in the meantime I will start with the ACL topics).

Thank you very much,

-----Ursprüngliche Nachricht-----
Von: Ian Boston [mailto:ianboston@googlemail.com] Im Auftrag von Ian Boston
Gesendet: Dienstag, 23. Februar 2010 10:10
An: users@jackrabbit.apache.org
Cc: users@jackrabbit.apache.org
Betreff: Re: AW: UserManagement

  rep:password is a protected property. Iirc you have to use
accesscontrolutils to set it. Have a look in the sling/bundles/jcr/
jackrabbit-accessmanager in apache sling to see an example of how.

Also I don't think that you can use rep:password in a search.
Unfortunately eclipse doesn't run on an iPhone so that's from memory ;)


Sent from my iPhone

On 23 Feb 2010, at 07:17, "Cech. Ulrich" <Ulrich.Cech@aeb.de> wrote:

> Hi Ian,
> thanks for your response.
> To 1 (changing password):
> The problem here is that i get the NoSuchElementException while
> calling:
> Value[] pwdProperty = ((User)auth).getProperty("rep:password");
> (copied from the Sling code)
> If I call:
> Authorizable a = um.getAuthorizable(userId); // 'um' is the normal
> UserManager
> Iterator<String> i = a.getPropertyNames();
> The resulting iterator is empty, so it seams that there are no
> properties for the user, what I think is not the case.
> <You could add an ACL to the root node that dened jcr:all or
> jcr:read for anonymous ?>
> Good idea ;-)... shame on me
> <You have to  use the UserManager and the search capabilities in
> there, /rep:security is protected so a normal session wont be able
> to get to it.>
> Like Matt asked in his post, how can we search for "all" existing
> users. I tried to find for example a special password with
> "um.findAuthorizables("rep:password", "admin");" for users with
> password "admin", but this also returned an empty iterator.
> Thanks again,
> Ulrich
> Treffen Sie AEB vom 2.-4. M?rz 2010 auf der LogiMAT in Stuttgart.
> Halle 5, Stand 407.
> Weitere Informationen und Terminvereinbarung unter: www.aeb.de/logimat

Treffen Sie AEB vom 2.-4. März 2010 auf der LogiMAT in Stuttgart. Halle 5, Stand 407.
Weitere Informationen und Terminvereinbarung unter: www.aeb.de/logimat

View raw message