You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Steve Nash <na...@googlemail.com> on 2009/10/15 09:40:22 UTC

folder creation problem

Hi All,

I am not able to create folder using the following code :

root = session.getRootNode();
root.addNode("testFolder", "nt:folder");
session.save();

It is throwing the error :
javax.jcr.AccessDeniedException: /testUser/testFolder/jcr:primaryType: not
allowed to modify item

Security configuration in repository.xml is as follows :

<Security appName="Jackrabbit">
        <!--
            security manager:
            class: FQN of class implementing the JackrabbitSecurityManager
interface
        -->
        <SecurityManager
class="org.apache.jackrabbit.core.DefaultSecurityManager"
workspaceName="security">
            <!--
            workspace access:
            class: FQN of class implementing the WorkspaceAccessManager
interface
            -->
            <!-- <param name="config" value="${rep.home}/security.xml"/> -->
        </SecurityManager>
        <AccessManager
class="org.apache.jackrabbit.core.security.DefaultAccessManager">
          <!--  <param name="config" value="${rep.home}/access.xml"/>-->
        </AccessManager>

      <LoginModule
class="org.apache.jackrabbit.core.security.authentication.DefaultLoginModule">
        <param name="anonymousId" value="anonymous"/>
        <param name="adminId" value="admin"/>
      </LoginModule>
</Security>

How can i create the folder using the above configuration of repository.xml
?

Thanks,
Steve