Expand my Community achievements bar.

SOLVED

Report for user/group permissions for all levels.

Avatar

Level 1

Need to generate detailed report for all user/groups entitlements for all hierarchy (in all levels)  in a cq instance.

Currently through user admin we need to navigate to each group and expand heirarchy to see entitlement for each group. And through access control tab in crxde lite  also we can see the current selected node permissions of the parent but not for child nodes.

So how can we generate detailed report for every user/group in cq instance.

1 Accepted Solution

Avatar

Correct answer by
Level 10

To generate a report as you describe, you need to write a custom AEM service, Them use the Jackrabbit API to get user/group information. You can use this API to get permissions for groups as described in this article:

http://scottsdigitalcommunity.blogspot.com/2016/03/using-jackrabbit-usermanager-apis-to.html

Then in your custom service, create a collection object that track the data. For example:

ArratList<JavaBean>

Where the JavaBean has data members that store data and there is a 1-1 between group and JavaBean. 

Once you get all of the data, you can export the data to Excel. We have articles that show you how to use Excel API in AEM. 

http://scottsdigitalcommunity.blogspot.com/2013/11/creating-custom-reporting-service-for.html

YOu can go further too and create an AEM scheduler service that will invoke this service on a weekly basis and then have the report emailed to interested stake holders. 

View solution in original post

2 Replies

Avatar

Correct answer by
Level 10

To generate a report as you describe, you need to write a custom AEM service, Them use the Jackrabbit API to get user/group information. You can use this API to get permissions for groups as described in this article:

http://scottsdigitalcommunity.blogspot.com/2016/03/using-jackrabbit-usermanager-apis-to.html

Then in your custom service, create a collection object that track the data. For example:

ArratList<JavaBean>

Where the JavaBean has data members that store data and there is a 1-1 between group and JavaBean. 

Once you get all of the data, you can export the data to Excel. We have articles that show you how to use Excel API in AEM. 

http://scottsdigitalcommunity.blogspot.com/2013/11/creating-custom-reporting-service-for.html

YOu can go further too and create an AEM scheduler service that will invoke this service on a weekly basis and then have the report emailed to interested stake holders. 

Avatar

Administrator

Hi,

In JSP / Java you can adapt your resource to UserManager class and get the current user or list down all the users and groups as per your requirement.

To list all the users or groups, you can use findAuthorizables() method available in the UserManger.

You can also obtain the User info in JS using CQ.User.getCurrentUser() which would return an instance of the current User, with which you can access the user's properties.

UserManager API :- https://docs.adobe.com/docs/en/aem/6-0/develop/ref/javadoc/org/apache/jackrabbit/api/security/user/U...

How to export the user list to a CSV :- http://blogs.adobe.com/dmcmahon/2012/02/29/cq-5-4-how-to-export-the-user-list-as-a-csv-file/ (Old article, but)

Reference article :- http://www.albinsblog.com/2015/03/how-to-get-userinfo-through-java-api-in.html#.WARbTvl97RY

You need to create ta custom service as per your need.

~kautuk



Kautuk Sahni