Am using a query debug url for listing out the users and their groups names in a json format link.
The following code snippet is giving me the users list.
p.hits=selective p.limit=-1 p.properties=rep:authorizableId rep:externalId path=/home/users type=rep:User p.properties=jcr:path
and the url JSON link me the JSON out put of the same.
Now i want to get filter/club the Users list along with group name (or groups list along with members), will it be possible? The resulted JSON i want to use in some exports for other activities.
Solved! Go to Solution.
Hi, Krishna
Here I created a sample utility that do the job. Just try it if you just want to export which user belongs to which group. It has some other features as well.
https://github.com/vamsijetty/useradmin-utility.git
/**
* Make sure you create a system user (using /crx/explorer) and give proper permissions to it.
* After you successfully create system user (For Ex: local-service-user) please Map that user to your service in
* Apache Sling Service User Mapper Service.
* Eg.: "com.handsonaem.vamsijetty.useradminutility.core:localservice=local-service-user"
*/
Hope this helps!
Why not use the User Manager API to retrieve user and group data and encode the result to JSON
https://jackrabbit.apache.org/api/2.0/org/apache/jackrabbit/api/security/user/UserManager.html
Views
Replies
Total Likes
smacdonald2008 wrote...
Why not use the User Manager API to retrieve user and group data and encode the result to JSON
https://jackrabbit.apache.org/api/2.0/org/apache/jackrabbit/api/security/user/UserManager.html
Thanks Scott, I have tried that API way it will workout but, the problem is i have to get the these user data from the production systems, where i am not recommended to deploy a bundle and get this work done, so checking for the front end way if this can be possible by any query builder ?
~VAr
Views
Replies
Total Likes
Hey Var,
Any updates on if you were able to achieve this? can I get the query that you wrote. I have pretty much the same requirement as you. I need to retrieve the list of all the Users with the groups they belong to.
Regards,
Krishna
Views
Replies
Total Likes
Hi, Krishna
Here I created a sample utility that do the job. Just try it if you just want to export which user belongs to which group. It has some other features as well.
https://github.com/vamsijetty/useradmin-utility.git
/**
* Make sure you create a system user (using /crx/explorer) and give proper permissions to it.
* After you successfully create system user (For Ex: local-service-user) please Map that user to your service in
* Apache Sling Service User Mapper Service.
* Eg.: "com.handsonaem.vamsijetty.useradminutility.core:localservice=local-service-user"
*/
Hope this helps!
HI Krishna,
Nope i didn't get a chance to work via Query debug url. we have implemented it via API route.
~VAr
Views
Replies
Total Likes
Good one Vamsi
Thanks a lot Vamsi. I will look into this.
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies