cancel
Showing results for 
Search instead for 
Did you mean: 

List all users

montreux
Champ in-the-making
Champ in-the-making
It is possible to search for users from within the Alfresco admin console but I would like to list ALL users, not just a subset relating to some particular query.

Is there an elegant way of doing this? It seems obvious to me that it should be but I can't seem to figure out how, a bit frustrating.

Thanks
Fred
2 REPLIES 2

nsquare
Champ in-the-making
Champ in-the-making
Did someone figure this out.

In any screen which asks for selecting users / groups - I am forced to type something in the search box. But I would like to view all users, so I can select a user from the list. [in screens such as inviting users to sites, assigning roles, viewing users, groups]. Why am I forced to enter a filer, what should I do if I want to view all the users? Looks like there is no way - wonder why!

Thanks in advance for any help!

darryl_staflund
Champ in-the-making
Champ in-the-making
This functionality isn't exposed as a web service – for security reasons no doubt.  But if you take a look at the following service class:


org.alfresco.service.cmr.security.AuthorityService

you will find the methods you are looking for, in particular:


Set<String> getAuthoritiesForUser(String userName);
Set<String> getAllAuthorities(AuthorityType type);
Set<String> getAllRootAuthorities(AuthorityType type);
Set<String> getContainedAuthorities(AuthorityType type);
Set<String> getContainingAuthorities(AuthorityType type);
Set<String> getAllAuthoritiesInInZone(String zoneName, AuthorityType type);
Set<String> getAllRootAuthoritiesInZone(String zoneName, AuthorityType type);
Set<String> findAuthorities(AuthorityType type, String parentauthority, boolean immediate, String displayNamePattern, String zoneName);

You can also take a look at the following class:


org.alfresco.service.cmr.security.PersonService

In particular, the following methods:


NodeRef getPerson(String userName);
NodeRef getPerson(String userName, boolean autoCreate);
Set<NodeRef> getAllPeople();
Set<NodeRef> getPeopleFilteredByProperty(QName propertyKey, Serializable propertyValue);

Darryl