Merged V3.4-BUG-FIX to HEAD

29702: ALF-5607: Possible fix from Bitrock
   29746: Merged V3.4 to V3.4-BUG-FIX
      29726: ALF-9233 and ALF-9846 Versions 0.1 and 0.2 of a new doc created via SPP had no cm:content property.
         - Changed code so that the first version of the doc would be 1.0 rather than 0.1
         - Changed code so that an existing document without ASPECT_VERSIONABLE would be saved as 1.0, before
           the 1.1 version from SPP is created. When an existing document had ASPECT_VERSIONABLE there was no
           need to create a new version.
         - The creation of the version from SPP is now created after the content property is set.
   29748: ALF-3681: Webdav lock issue returned on 3.3g


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@29750 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Dave Ward
2011-08-15 10:19:30 +00:00
parent bfd54b4d3c
commit 20d475b91f

View File

@@ -25,6 +25,7 @@ import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.Serializable;
import java.util.Date;
import java.util.HashMap;
import java.util.Iterator;
@@ -884,7 +885,21 @@ public abstract class WebDAVMethod
}
else
{
throw new WebDAVServerException(WebDAV.WEBDAV_SC_LOCKED);
// ALF-3681 fix. WebDrive 10 client doesn't send If header when locked resource is updated so check the node by lockOwner.
if (m_userAgent != null && m_userAgent.equals(WebDAV.AGENT_MICROSOFT_DATA_ACCESS_INTERNET_PUBLISHING_PROVIDER_DAV))
{
String currentUser = getAuthenticationService().getCurrentUserName();
Serializable lockOwner = fileInfo.getProperties().get(ContentModel.PROP_LOCK_OWNER);
if (lockOwner.equals(currentUser))
{
return nodeLockInfo;
}
}
else
{
throw new WebDAVServerException(WebDAV.WEBDAV_SC_LOCKED);
}
}
}