Hi Simer, On Wed, Sep 23, 2009 at 8:54 AM, simer anand <[email protected]> wrote: > ...I went through > the sample programs at > http://java.sun.com/j2se/1.4.2/docs/guide/security/jaas/tutorials/GeneralAcnAndAzn.html > and then i tried to implement it for that i put jar files into the classpath > and in repositiory.xml i placed the class file <AccessManager class = > "sample.SampleAction"> </AccessManager> > and then i went to the > http://localhost:8080/jackrabbit-webapp-1.5.6./repository/default/ > then it asked for the username and password and after submitting them it > showed something like this > > javax.jcr.RepositoryExceptionfailed to instantiate > AccessManagerimplementation : > org.apache.jackrabbit.core.security.simple.SimpleAccessManager: > sample.SampleAction cannot be cast to > org.apache.jackrabbit.core.security.AccessManager
The problem is that you cannot use your sample.SampleAction class in <AccessManager> as that class does not implement the org.apache.jackrabbit.core.security.AccessManager interface. See http://jackrabbit.apache.org/jackrabbit-configuration.html#JackrabbitConfiguration-Securityconfiguration for details. If you want to control what parts of the repository content the user is allowed to access and modify, you'll have to implement an AccessManager, not a PrivilegedAction. -Bertrand
