mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Fixed problem where a newly created file could get read-only access rights fi the open file request specified read access attributes.
This caused a problem with Excel saving files. AWC-1200. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@6224 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -273,7 +273,7 @@ public class ContentDiskDriver extends AlfrescoDiskDriver implements DiskInterfa
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the file folder server
|
* Set the file folder service
|
||||||
*
|
*
|
||||||
* @param fileService FileFolderService
|
* @param fileService FileFolderService
|
||||||
*/
|
*/
|
||||||
@@ -361,13 +361,15 @@ public class ContentDiskDriver extends AlfrescoDiskDriver implements DiskInterfa
|
|||||||
}
|
}
|
||||||
else if (nodeRefs.size() == 0)
|
else if (nodeRefs.size() == 0)
|
||||||
{
|
{
|
||||||
// nothing found
|
// Nothing found
|
||||||
|
|
||||||
throw new DeviceContextException("No root found for device: \n" +
|
throw new DeviceContextException("No root found for device: \n" +
|
||||||
" root path: " + rootPath);
|
" root path: " + rootPath);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// we found a node
|
// We found a node
|
||||||
|
|
||||||
rootNodeRef = nodeRefs.get(0);
|
rootNodeRef = nodeRefs.get(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1416,7 +1418,11 @@ public class ContentDiskDriver extends AlfrescoDiskDriver implements DiskInterfa
|
|||||||
|
|
||||||
// Create the network file
|
// Create the network file
|
||||||
|
|
||||||
NetworkFile netFile = ContentNetworkFile.createFile(nodeService, contentService, mimetypeService, cifsHelper, nodeRef, params);
|
ContentNetworkFile netFile = ContentNetworkFile.createFile(nodeService, contentService, mimetypeService, cifsHelper, nodeRef, params);
|
||||||
|
|
||||||
|
// Always allow write access to a newly created file
|
||||||
|
|
||||||
|
netFile.setGrantedAccess(NetworkFile.READWRITE);
|
||||||
|
|
||||||
// Truncate the file so that the content stream is created
|
// Truncate the file so that the content stream is created
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user