AnsweredAssumed Answered

Owner Permissions disabled after inheritance set to false

Question asked by venkat on Mar 26, 2007
Latest reply on Mar 29, 2007 by venkat
Hi all,

   I created a document in the user home space using a custom content type that is derived by extending cm:content.  I also set the owner aspect to the custom content type during node creation.

   The user could checkout the document normally. However when the user sets the inheritance on the document to false, the checkout fails saying that access is denied. But the perplexing thing is that when the user creates a document of type "cm:content", then the checkout works normally even when the inheritance is set to false. Why is this behaviour different for custom content types?

/* WORKS FOR normal Content Type */ 
      assocRef = nodeService.createNode(
                folderRef,
                ContentModel.ASSOC_CONTAINS,
                QName.createQName(NamespaceService.CONTENT_MODEL_1_0_URI, QName.createValidLocalName(fileName)),
                ContentModel.TYPE_CONTENT,
                nodeProperties);
        NodeRef currRef = assocRef.getChildRef();
        permissionService.setInheritParentPermissions(currRef , false);
        versionOperationsService.checkout(currRef );
       
       
        /* Fails with access denied for custom content type during checkout */
        assocRef = nodeService.createNode(
                folderRef,
                ContentModel.ASSOC_CONTAINS,
                QName.createQName(CUSTOM_MODEL_URI, QName.createValidLocalName(fileName)),
                ContentModel.TYPE_CUSTOM_CONTENT,
                nodeProperties);
        NodeRef currRef = assocRef.getChildRef();
        permissionService.setInheritParentPermissions(currRef , false);
        versionOperationsService.checkout(currRef );

Thanks,
Venkat

Outcomes