jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Neale" <michael.ne...@gmail.com>
Subject Re: How should a Custom AccessManager access a Node ?
Date Fri, 13 Oct 2006 08:59:15 GMT
Sririam - would you care to add some info to the wiki on your findings?
While access manager is not part of JCR, woudl be nice to have a wiki page
on how to use it effectively to create ACLs as you are doing.

Michael.

On 10/12/06, Sriram Narayanan <sriramnrn@gmail.com> wrote:
>
> On 10/10/06, C. K. Ponnappa <ckponnappa@gmail.com> wrote:
> >
> > Something like:
> >
> > checkPermission(args){
> >
> > if(subject == "our_access_manager" && action =="READ")
> >     return; // grant ourselves permissions
> > }
> >
> > repository = getRepositoryFromJNDI();
> > session = repository.login(new
> > AccessManagerCredentials("our_access_manager","our_password"));
> > Node node = session.getNodeByUUID(itemID.getUUID());
> > String permissions = node.getProperty("permissions").getValue();
> >
> > if(permitted(permissions,subject))
> >     return;
> > throw new AccessDeniedException();
> > }
> >
>
> I'm working on the above right now. Then authentication for the normal
> user as well as the AccessManager works fine. Thanks all who have
> responded.
>
> However, after the access is granted, I get an Exception at the point
> of accessing the Node. I'll post this on a separate thread.
>
> -- Sriram
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message