mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-10-15 15:02:20 +00:00
Merged 5.1-MNT1 (5.1.0) to HEAD (5.1)
115568 adavis: Merged 5.1.N (5.1.1) to 5.1-MNT1 (5.1.0) 112922 adavis: Merged 5.0.N (5.0.3) to 5.1.N (5.1.1) 112636 abozianu: MNT-14687 : Creating a document as checkedout and then canceling the checkout should delete the document - reverted fix due to test failure git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@115698 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -707,10 +707,6 @@ public class CheckOutCheckInServiceImpl implements CheckOutCheckInService
|
||||
|
||||
// Invoke policy
|
||||
invokeOnCancelCheckOut(nodeRef);
|
||||
|
||||
// If the node does not have an initial version checked out delete it
|
||||
removeNodeIfInCheckedOutState(nodeRef);
|
||||
|
||||
}
|
||||
catch (UnableToReleaseLockException exception)
|
||||
{
|
||||
@@ -724,25 +720,6 @@ public class CheckOutCheckInServiceImpl implements CheckOutCheckInService
|
||||
return nodeRef;
|
||||
}
|
||||
|
||||
/**
|
||||
* If the node does not have an initial version checked out delete it.
|
||||
* MNT-14687 - Creating a document as checkedout and then cancelling the
|
||||
* checkout should delete the document.
|
||||
*/
|
||||
private void removeNodeIfInCheckedOutState(NodeRef nodeRef)
|
||||
{
|
||||
if (!nodeService.hasAspect(nodeRef, ContentModel.ASPECT_VERSIONABLE))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Boolean initialVersion = (Boolean) nodeService.getProperty(nodeRef, ContentModel.PROP_INITIAL_VERSION);
|
||||
if (initialVersion != null && initialVersion == false)
|
||||
{
|
||||
nodeService.deleteNode(nodeRef);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public NodeRef getWorkingCopy(NodeRef nodeRef)
|
||||
{
|
||||
|
Reference in New Issue
Block a user