actinium15 commented on a change in pull request #40:
URL: 
https://github.com/apache/sling-org-apache-sling-distribution-core/pull/40#discussion_r414239751



##########
File path: 
src/main/java/org/apache/sling/distribution/agent/impl/PrivilegeDistributionRequestAuthorizationStrategy.java
##########
@@ -105,5 +113,14 @@ private String getClosestParent(Session session, String 
path) throws RepositoryE
         return null;
     }
 
+    private static Privilege[] computePrivileges(AccessControlManager acMgr, 
String[] jcrPrivileges, String jcrPrivilege)

Review comment:
       I think the primary reason they are recomputed today is because 
`String`=>`Privilege` needs a JCR session (`AccessControlManager`, which is 
derieved from `Session`) which isn't available in 
`PrivilegeDistributionRequestAuthorizationStrategy()` (or 
`PrivilegeDistributionRequestAuthorizationStrategyFactory.activate`).
   
   IMHO using a service session for doing that might be an overkill.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to