hi Robert On May 15, 2014, at 5:54 PM, Robert A. Decker <[email protected]> wrote:
> Hello, > > I’m successfully using ServiceUserMapper but I’m not sure if I’m using it > quite right. > > I have a bundle, "astra-utility" and in it a service “DatastoreGCService". > > In my configurations, in "Apache Sling Service User Mapper Service", I have a > user.mapping of "astra-utility=admin” > > In my code I have: > ResourceResolver rr = > resourceResolverFactory.getServiceResourceResolver(null); > > This all works - I’m able to get the ResourceResolver. However, here are my > questions: > > > 1) How do I define a subservice-name for my service? I would like the > user.mapping to be “astra-utility:DatastoreGCService=admin”. > > 2) Is it possible to add user.mappings to the user mapper service with > sling-initial-content from multiple bundles without each bundle interfering > with the other bundles' mappings? this is not possible at the moment. May you please log a new JIRA improvement for that? IMHO this would be the way to go for improve the user service mapper regards antonio > If two bundles define that configuration will the default be the last bundle > installed? > > I don’t think that I can do it programmatically - ServiceUserMapper only > exposes one method, getServiceUserID. > > If #2 isn’t possible, then should I create a service in a foundation bundle > that all of my projects use that provides a resourceResolver based on a > passed in user name? This would mean though that I’m using the > ServiceUserMapper in a way that I don’t think it was intended for - more > user-centric than service-centric. > > Robert A. Decker > [email protected] > http://robdecker.com/about > >
