jackrabbit-oak-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jukka Zitting <jukka.zitt...@gmail.com>
Subject Re: Access workspace name withing CommitHook
Date Wed, 06 Feb 2013 11:05:19 GMT
Hi,

On Wed, Feb 6, 2013 at 10:57 AM, Angela Schreiber <anchela@adobe.com> wrote:
> in order to address OAK-444 without excessive uuid resolution
> upon access control evaluation i create a separate commit hook
> that keeps track of the path of versionable nodes .

I would simply use UUID lookups for that. The UUID index already
maintains an efficient "UUID -> path" mapping, so maintaining a
separate "versionable UUID -> path" map seems unnecessary. Or were you
thinking about something like a "workspace name -> path" mapping
stored as a hidden part of all version history nodes? In either case
the cost of the path lookups would probably be roughly the same as
using the general "UUID -> path" mapping, so I'm not sure whether the
extra hook would really be needed.

> so far i didn't find a pleasant way to retrieve the workspace
> name associated with the current commit. is this something
> that could be added to the CommitHook interface?

Assuming that logins are per-workspace, the User associated with a
session could have something like a WorkspacePrincipal that identifies
the workspace against which the authentication happened.

Alternatively, assuming we implement multiple workspaces by adding an
extra layer to the tree hierarchy, the commit hook could record the
workspace name as it descends through the content diff.

BR,

Jukka Zitting

Mime
View raw message