jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "(Berry) A.W. van Halderen" <b.vanhalde...@hippo.nl>
Subject Re: RepositoryImpl in the AccessManager
Date Wed, 31 Oct 2007 16:32:47 GMT
On Tue, Oct 23, 2007 at 11:47:27AM -0700, bilobag wrote:
> So I am attempting to create a SessionImpl with a system subject so that it
> can have full access to the repository.  I want to use this SessionImpl in
> my custom AccessManager to query properties of the nodes(ie. node type) to
> determine whether a user should have access to a particular node.  I am
> using spring with jackrabbit and I'm not sure what the best way is to get a
> ref to a RepositoryImpl.  Can someone please give some advise.  i have been
> working on this for a week straight now.  Thanks in advance.

Check out our AccessManager, source available in public available SVN:


The trick is that you have to extend a number of JackRabbit classes,
such that you are using your own, extended, RepositoryImpl, SessionImpl,
etcetera, in order to create a own (extended) version of a HierarchyManager.
This HierarchyManager can then expose, the otherwise protected method
which allows you to get the actual ItemState.

HOWEVER: be very aware that there may be severe implications with this
approach.  I think (but maybe a jackrabbit architect can comment) that
it is not by change that you have only access to ItemId in the access
manager, and not to ItemState as well.  This because an access manager
might be required to quickly filter out non accessible items (nodes or
properties) before returning.  If it would need to constantly access
the actual state, it might have fatal performance consequences.

We don't have experience with this yet, but it is on our mid-term to-do list.
So if you gain further experience, let us (all) know.

Berry A.W. van Halderen           b.vanhalderen@hippo.nl / berry@halderen.net
Disclaimer: the above is the author's personal opinion and is not the opinion
or policy of his employer or of the little green men that have been following
him all day.

View raw message