Bertrand Delacretaz  wrote
> Hi,
> 
> On Wed, Mar 17, 2010 at 2:45 AM, Justin Edelson <justinedel...@gmail.com> 
> wrote:
>> Currently, although it's possible to log into different workspaces via
>> AuthenticationInfo (even if httpauth and formauth don't support this);
>> script resolution only happens against the default workspace. I don't
>> see any reason for this restriction - it seems to me you should resolve
>> scripts from the same workspace as the one resource was resolved from. 
>> WDYT?...
> 
> In general yes, thought it might be interesting to fallback to another
> workspace?
> 
> Assuming you use workspaces for multi-homed websites, one could
> imagine having a "generic scripts" workspace where the script
> resolution would look after looking in the current resource's
> workspace.
> 
> That might complicate things and/or cause performance issues
> though...just thinking that it might be a valid use case, so just
> having hooks for that might be good enough for now.
> 
I'm not sure what the best way is, but Sling is resource tree based. The
resource resolver (factory) gets configured with resource search paths
(/apps and /libs is default) for scripts.
The script resolver uses these paths to search for scripts. The script
resolver uses an own session and therefore resource resolver which is
not related to the current request. This allows a more secure
installation as the current user does not have to have read rights for
the scripts (or any other access rights).

In general I am not sure if it should be the authentication which
defines what workspace is used. I rather could picture having a resource
tree where workspaces are mounted at different locations in the tree.
The script resolution could then be configured to search in the various
workspaces.

Carsten
-- 
Carsten Ziegeler
cziege...@apache.org

Reply via email to