On 16 Sep 2009, at 18:04, Vidar Ramdal wrote:

On Wed, Sep 16, 2009 at 9:58 AM, Ian Boston <[email protected]> wrote:

On 16 Sep 2009, at 17:38, Vidar Ramdal wrote:

On Wed, Sep 16, 2009 at 12:32 AM, Ian Boston <[email protected]> wrote:

Looking at PluggableDefaultAccessManager,

Is it possible to implement a AccessManagerPlugin that uses the
DefaultAccessManager that comes with Jackrabbit for most of the ACL
resolution calls. It looks like the PluggableDefaultAccessManager is an
all
or nothing switch to the plugin if its there.

IIRC DefaultAccessManager is well protected from an extension point of
view
and the PluggableDefaultAccessManager has all its public methods
overwritten
so you cant get to the super externally.

I think (but could be wrong) its all or nothing as it stands, it would be nice to ask the plugin first and then ask the default but boolean is only
true or false :(

You're probably right, the PluggableDefaultAccessManager (PDAM) is all
or nothing.
Letting your AccessManagerPlugin (AMP) fall back to
DefaultAccessManager (DAM) seems to be a valid usecase.

What if we alter the AMP interface and let the boolean methods
(isGranted, canRead) return Booleans instead? That way, the AMP could
return null to signalize that handling should fall back to
DefaultAccessManager.


Yes that would work, or let them throw an exception ?
UnableToHandleAccessAssertionException

I know some don't like using Exceptions in this way, so I would be just as
happy with use nulls with good javadoc on the interface.

Yes, I would be one of those people. Unless falling back to
DefaultAccessManager is considered exception handling, I think we
should avoid an UnableToHandle...Exception.

:), ok javadoc it is then.


Happy to do the work, as I think it might allow me to eliminate one of my
larger patches to Sling I am having to maintain.

Excellent!

will do, jira -> patch -> review -> commit as usual. I'm wont just trample of the api.

Ian


--
Vidar S. Ramdal <[email protected]> - http://www.idium.no
Sommerrogata 13-15, N-0255 Oslo, Norway
+ 47 22 00 84 00 / +47 21 531941, ext 2070

Reply via email to