karlpauls commented on issue #1: Initial attempt on providing default 
ServiceUserMapped and only mappi…
URL: 
https://github.com/apache/sling-org-apache-sling-serviceusermapper/pull/1#issuecomment-435516601
 
 
   @cziegeler, I had a first pass on this. Basically, I think this issues comes 
down to two things namely,
   
   1. only provided ServiceUserMapped services for mapping where the service 
user is valid
   2. provide ServiceUserMapped service(s) for the default user (if any).
   
   In regard to 1) it turns out, we already have verification around - we just 
didn't use it for the mappings. Consequently, I just piggyback on the existing 
verification and only make services available (i.e., filter out all that don't) 
that have a valid service user. That should work ok for the case where we don't 
have jcr around as in that case there is no verifier (and hence, all service 
users are valid) - unless somebody provides a different one (i.e., it is up to 
the resource providers to provide verifiers). 
   
   In regard to 2) I publish a default ServiceUserMapped in case default user 
is enabled (or provided). I then turn around in the hooks and make sure it is a 
valid one (its a little more complicated in there because we don't want to 
check for them unless we have to as that generated warnings).
   
   The result seems to work. The patch could use some more comments and could 
be cleaned up a little but I wanted to get your opinion first on the overall 
idea. WDYT? 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to