You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by GitBox <gi...@apache.org> on 2018/11/02 21:37:09 UTC

[GitHub] karlpauls commented on issue #1: Initial attempt on providing default ServiceUserMapped and only mappi…

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:
users@infra.apache.org


With regards,
Apache Git Services