Merged 5.2.N (5.2.1) to HEAD (5.2)

129501 jcule: REPO-1023: Service Pack: MNT-16454 Can't use WebDAV to delete files which have the versionable aspect
     - check that node is is actually locked before unlocking to avoid access denied


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@130207 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Alan Davis
2016-09-06 14:33:44 +00:00
parent 064b771ae0
commit f968da0d26

View File

@@ -189,8 +189,13 @@ public class DeleteMethod extends WebDAVMethod implements ActivityPostProducer
};
// Schedule a real delete 5 seconds after the current time
deleteDelayTimer.schedule(deleteDelayTask, 5000L);
}
//MNT-16454: It should be possible to delete files with versionable aspects using webdav; check that
//node is is actually locked before unlocking to avoid access denied
if(getDAVLockService().getLockInfo(nodeRef).isLocked())
{
getDAVLockService().unlock(nodeRef);
}
getDAVLockService().unlock(nodeRef);
}
// We just ensure already-hidden nodes are left unlocked
else if (fileFolderService.isHidden(nodeRef))