raducotescu commented on code in PR #43: URL: https://github.com/apache/sling-org-apache-sling-jcr-resource/pull/43#discussion_r1605242759
########## src/main/java/org/apache/sling/jcr/resource/internal/helper/jcr/JcrProviderStateFactory.java: ########## @@ -111,7 +111,20 @@ private static Bundle extractCallingBundle(@NotNull Map<String, Object> authenti } else { final Object subService = authenticationInfo.get(ResourceResolverFactory.SUBSERVICE); final String subServiceName = subService instanceof String ? (String) subService : null; - session = repo.loginService(subServiceName, null); + // let's shortcut the impersonation for service users, if impersonation was requested Review Comment: It is a shortcut, since impersonation would have been handled in https://github.com/apache/sling-org-apache-sling-jcr-resource/blob/f82678ae650a67538d261bcdc5d1e254039e9a37/src/main/java/org/apache/sling/jcr/resource/internal/helper/jcr/JcrProviderStateFactory.java#L150, through calling https://github.com/apache/sling-org-apache-sling-jcr-resource/blob/f82678ae650a67538d261bcdc5d1e254039e9a37/src/main/java/org/apache/sling/jcr/resource/internal/helper/jcr/JcrProviderStateFactory.java#L189. I think I should rephrase the comment to "[...] impersonation for services [...]", since that was my intention. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@sling.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org