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 <[EMAIL PROTECTED]> wrote:

On 10/10/06, C. K. Ponnappa <[EMAIL PROTECTED]> 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

Reply via email to