You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "angela (Created) (JIRA)" <ji...@apache.org> on 2011/09/30 12:13:46 UTC

[jira] [Created] (JCR-3088) WorkspaceImpl.createWorkspace(String,String) is not atomic

WorkspaceImpl.createWorkspace(String,String) is not atomic
----------------------------------------------------------

                 Key: JCR-3088
                 URL: https://issues.apache.org/jira/browse/JCR-3088
             Project: Jackrabbit Content Repository
          Issue Type: Bug
            Reporter: angela


the implementation of Workspace.createWorkspace(String newName, String srcWsp) does not properly deal
with exceptions raised upon copying data from the source workspace. While the operation fails the creation
of the new workspace is not reverted.

This can easily be reproduced by calling the method with a non-admin session that at some level lacks
the permission to clone into the  newly created workspace.

suggested fix:
in case cloning the source wsp fails the wsp creation should be reverted before throwing the exception
that indicates that the workspace creation operation failed.

Off topic remark: this will even fail if the editing session was granted full permission on root node in the 
source workspace due to the fact, that effective ac on the target workspace is the one defined by 
default on an empty workspace (hopefully not granting everyone write permission to by default).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira