AEM4BEGINNER blog is for Beginners who are interested in learning Adobe Experience Manager (AEM) aka Adobe CQ5 from basics. The Information provided in this blog is for learning and testing purposes only. Here, I have posted the information which I know or gathered from different sources.
Using the Sling API to Query AEM Resources that belong to a Closed User Group
You can create an Adobe Experience Manager (AEM) application that queries AEM resources located in the AEM Java Content Repository (JCR) and part of a Closed User Group. To query AEM resources, you can use the Sling API from within an OSGi bundle to retrieve a resource from within the AEM JCR. To use the Sling API from within an OSGi component, you inject an org.apache.sling.api.resource.ResourceResolverFactory instance into the service. See Interface ResourceResolverFactory.
To use the Sling API to query AEM resources that belong to a CUG, you have to use an AEM System user that meet these requirements:
belongs to the CUG has read permissions to the AEM resources For example, consider the following AEM page resources that are children pages to /content/geometrixx/en/toolbar/contacts.
No comments:
Post a Comment
If you have any doubts or questions, please let us know.