jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Angela Schreiber <anch...@day.com>
Subject Re: AccessManager in Jackrabbit v1.5
Date Tue, 13 Apr 2010 08:30:55 GMT
hi ivo

> I need help on this Jackrabbit AccessManager.
> I have custome AccessManager, providing access security based on the logged
> account and the permissions an account has. Basically, the permissions apply
> over a folder (kind of) - one can see a folder, put some items in it, edit
> these items, etc. The type of items a folder can accomodate is also part of
> the security.
> 
> My problem in particular concerns the creation of item in some folder. In
> this case, AccessManager.isGranted(path, perm) is called to resolve the
> access. I'm trying to get the new-created item from the session in order to
> check its type and if it is applicable to the folder security settings. This
> is done through ItemManager and HierarchyManager. The call gets back to
> AccessManager.isGranted asking for read permission. Eventually, I'm getting
> into a dead loop.

if i'm not mistaken you are using the same session and the
same API calls for the permission checking than for the
access. that won't work.
i think you need to operate on the itemstate level instead,
if you want to retrieve characteristics of transient items
in the access manager.

similarly you must use a different (system) session to
evaluate access control if it is stored in the content. you
cannot use the one your are evaluating the permissions for.

regards
angela

> For the other operations I'm using session impersonation with some super
> account, having read permission everywhere.
> 
> So, does anyone can help with this? I guess I'm not the first fighting this
> problem. Thanks.
> 
> Cheers, Ivo Kolev


Mime
View raw message