January 2, 2021
Estimated Post Reading Time ~

User Admin Console (Classic UI) & Crashing Browsers

As businesses grow, the number of end-users and groups in Adobe Experience Manager (AEM) tends to increase as well. I recently worked with two clients who are synchronizing users and associating users to the groups through the custom sync handlers to CRX (the content repository in AEM).

Business Analysts (BA) or AEM Admins use the User Admin console and CRX/DE Lite to debug user- or group-related issues. Due to large number of users and groups, when we do a search for a user or group, sometimes it’ll cause the browser to crash. This issue is known to occur with various browsers.

What are the alternative ways to find the user attributes and group information? Query Builder and SQL2 queries come in handy to help you find basic information of the users and groups. Below are two sample queries.

1. Find all attributes of users.
To verify that all attributes have been synchronized correctly through a custom sync handler, we can use the following query:

http://localhost:4503/bin/querybuilder.json?p.hits=full&property=rep:authorizableId&property.value=uid&type=rep:User

Sample:
http://localhost:4503/bin/querybuilder.json?p.hits=full&property=rep:authorizableId&property.value=ryan.palmer@spambob.com&type=rep:User


(click the image to enlarge it)

2. Find all the groups the user is associated with.
Users are associated to groups to view permission-sensitive contents. Group names are used as CUG (Closed User Groups) on the page to allow users to view the page. To verify whether a user is associated to correct group, we can use the following query.

http://localhost:4503/bin/querybuilder.json?p.hits=full&property=rep:members&property.value=uuidvalue&type=rep:Group

Sample:
http://localhost:4503/bin/querybuilder.json?p.hits=full&property=rep:members&property.value=9253def2-e0b5-3b5c-ad02-0f7d79848d83&type=rep:Group

(click the image to enlarge it)

Alternatively, the equivalent SQL2 query can be executed in CRX/DE Lite query tool:

SELECT * FROM [rep:Group] AS s WHERE ISDESCENDANTNODE([/home/groups]) AND s.”rep:members” = CAST(‘uuidvalue’ AS WEAKREFERENCE)

Sample:
SELECT * FROM [rep:Group] AS s WHERE ISDESCENDANTNODE([/home/groups]) AND s.”rep:members” = CAST(‘9253def2-e0b5-3b5c-ad02-0f7d79848d83’ AS WEAKREFERENCE)

(click the image to enlarge it)

Based on the above sample queries, you can build more complex queries to debug user- and group-related issues. AEM’s Query Builder and CRX/DE Lite query tool with JCR query language can save you time and resources when you are exploring CRX repository.


By aem4beginner

No comments:

Post a Comment

If you have any doubts or questions, please let us know.