This works
resolver().getAttribute(org.apache.sling.api.resource.ResourceResolver.USER_IMPERSONATOR);
is it ok to use, is there a better way?

From: Ankush Malhotra <[email protected]<mailto:[email protected]>>
Date: Friday, August 8, 2014 1:33 PM
To: "[email protected]<mailto:[email protected]>" 
<[email protected]<mailto:[email protected]>>
Subject: Getting impersonator from resourceresolver

Hi devs,
Is there a way to find the impersonating user from resolver rather than the 
user being impersonated[1]. There are certain auditing requirements where the 
power user performing(impersonating) action on behalf of someone needs to be 
logged in audit records.
-Ankush

[1]https://sling.apache.org/apidocs/sling6/org/apache/sling/api/resource/ResourceResolver.html#getUserID()

Reply via email to