Skip to main content
olegd52630483
Level 2
Nov 12, 2015 11:12 AM UTC
Solved

How can i get an impersonated resourceResolver by user id under AEM 6.1.

Map<String, Object> resolverImpersonationConfig = new HashMap<String, Object>(0);resolverImpersonationConfig.put(ResourceResolverFactory.USER_IMPERSONATION, userId);return resourceResolverFactory.getServiceResourceResolver(resolverImpersonationConfig);

This does not work under AEM 6.1!!!!!!!!!!!!!!!!!!!!!!

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
smacdonald2008
smacdonald2008Accepted solution
Level 10
Nov 12, 2015 5:28 PM UTC
In AEM 6.1  you need system user. A non System user does not work.     

4 replies

smacdonald2008
Level 10
Nov 12, 2015 2:24 PM UTC

For AEM 6.1, you need to use a System user. See this article to learn how:

http://scottsdigitalcommunity.blogspot.ca/2015/11/using-java-query-object-model-within.html

Translate
olegd52630483
Level 2
Nov 12, 2015 3:36 PM UTC
"Using the Java Query Object Model within Adobe Experience Manager" ?

What 'Query Object Model' to do with it?

Translate
smacdonald2008
Level 10
Nov 12, 2015 3:48 PM UTC
  It's an example of why I need a JCR session. The important thing to note is how to successfully create an AEM JCR session using a system user in AEM 6.1.
Translate
smacdonald2008
smacdonald2008Accepted solution
Level 10
Nov 12, 2015 5:28 PM UTC
In AEM 6.1  you need system user. A non System user does not work.     
Translate