On 2/2/07, ruchi goel <[EMAIL PROTECTED]> wrote:
Hi all, I want to know how r/w/o permissions are used for jcr nodes. Session class is supposed to implement checkPermissions. Does Jackrabbit implement it ? As far as I can understand, It creates an instance of AccessManager . Does it allow plugging in the AccessManager ? Do we store permissions as properties of nodes ?
Yes. JackRabbit does indeed allow us to plug in our own access managers. All you need to do is specify your class in the repository.xml file. Read the sources for SimpleAccessManager and you'll find some starting information for your own access manager. Also, search the threads for the duration of October-November 2006, and you'll find some posts by me and responses on how to write custom Access Managers. I was supposed to complete my own implementation and contribute that as a patch, but I'm really tied up with other work right now. Essentially, here's what you need to do: 1. Write your own EventListener. 2. Listen to Node creation and Node Deletion events via this EventListener. 3. Store the UUID and permission information of that node somewhere. This has to be a location outside of your repository 4. When a Node is being accessed, you AccessManager should use the UUID, look this up in its own storage (mentioned in point 3 above), and then return permissions for read and write as required. -- Sriram
