jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sriram Narayanan" <sriram...@gmail.com>
Subject Re: How should a Custom AccessManager access a Node ?
Date Thu, 12 Oct 2006 11:17:30 GMT
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
View raw message