From 00f38fb7c467f1390dec5ecc0968a9f934ea88ac Mon Sep 17 00:00:00 2001 From: Mark Rogers Date: Wed, 30 Apr 2014 16:15:09 +0000 Subject: [PATCH] Merged HEAD-BUG-FIX (4.3/Cloud) to HEAD (4.3/Cloud) 68140: Merged V4.2-BUG-FIX (4.2.3) to HEAD-BUG-FIX (4.3/Cloud) 67633: Merged V4.1-BUG-FIX (4.1.9) to V4.2-BUG-FIX (4.2.3) 67123: Merged changes from 4.1.6 and DEV: 65930: MNT-11035: Site manager cannot cancel editing of a file which is being edited with Edit Online - Back to the previous implementation of ScriptNode#getIsLocked() method that was changed in MNT-8736. Also, the upload.post.js was corrected to allow new version upload operation for a locked working copy. 65936: MNT-11035: Site manager cannot cancel editing of a file which is being edited with Edit Online - Fix build failure. Add required imports. 67065: MNT-11036: Cancel Editing link does not appear for Edit Online - Unlock permission is required for "Cancel Editing" action, when a document is in "Edit Online" state. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@68424 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- .../org/alfresco/repository/upload/upload.post.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/config/alfresco/templates/webscripts/org/alfresco/repository/upload/upload.post.js b/config/alfresco/templates/webscripts/org/alfresco/repository/upload/upload.post.js index 8dadad89f5..5e60d02ef6 100644 --- a/config/alfresco/templates/webscripts/org/alfresco/repository/upload/upload.post.js +++ b/config/alfresco/templates/webscripts/org/alfresco/repository/upload/upload.post.js @@ -219,14 +219,15 @@ function main() return; } - if (updateNode.isLocked) + var workingcopy = updateNode.hasAspect("cm:workingcopy"); + if (!workingcopy && updateNode.isLocked) { - // We cannot update a locked document + // We cannot update a locked document (except working copy as per MNT-8736) exitUpload(404, "Cannot update locked document '" + updateNodeRef + "', supply a reference to its working copy instead."); return; } - if (!updateNode.hasAspect("cm:workingcopy")) + if (!workingcopy) { // Ensure the file is versionable (autoVersion = true, autoVersionProps = false) updateNode.ensureVersioningEnabled(true, false);