On Thu, Aug 20, 2009 at 1:47 PM, John Crawford<[email protected]> wrote: > What if my target workspace does not have sling installed? Only the root > (default) workspace.
That was my comment about the need for Sling to find scripts, but as Carsten indicates Sling should always look for scripts in the default workspace, so that should not be a problem. Not much tested though, I assume. Note also that you can also get at other workspaces in scripts, via currentNode.getSession().getRepository().login(...). Not the cleanest thing but that might be useful for experimenting. -Bertrand > > > On Aug 20, 2009, at 2:11 AM, Carsten Ziegeler <[email protected]> wrote: > >> Bertrand Delacretaz wrote: >>> >>> Hi, >>> >>> On Thu, Aug 20, 2009 at 8:36 AM, Felix Meschberger<[email protected]> >>> wrote: >>>> >>>> John Crawford schrieb: >>>>> >>>>> Does anyone know if it possible to modify data / structure in another >>>>> workspace (outside of the current sling sandbox) if the user has the >>>>> proper >>>>> credentials to that workspace? >>>> >>>> The SlingPostServlet itself cannot do this at the moment: It is using >>>> the session of the current request and thus only has access to the >>>> workspace of the session. >>> >>> According to https://issues.apache.org/jira/browse/SLING-727, >>> implementing a custom AuthenticationHandler (or improving the existing >>> AuthorizationHeaderAuthenticationHandler [1]) would allow you to >>> specify a workspace at login. >>> >>> Sling would need to fall back to the default workspace to find scripts >>> - that should work in theory, but there might be some bugs as I'm not >>> sure if people are currently using this. >>> >> This should work with the latest code from trunk as now a script admin >> session is used to query the script locations. >> >> Carsten >> -- >> Carsten Ziegeler >> [email protected] >
