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/BRANCHES/DEV/5.2.N/root@129501 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Jelena Cule
2016-08-14 18:06:06 +00:00
parent c82cfb582c
commit 943a9ea417

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))