moved from d50a38db

This commit is contained in:
pavelbannov 2021-11-29 18:40:22 +03:00
parent d28cb30305
commit dec07c931c
3 changed files with 27 additions and 16 deletions

View File

@ -60,7 +60,7 @@
"commented-docs": [ ".docx", ".docxf", ".xlsx", ".pptx" ],
"convert-docs": [ ".pptm", ".ppt", ".ppsm", ".pps", ".potx", ".potm", ".pot", ".odp", ".fodp", ".otp", ".xlsm", ".xls", ".xltx", ".xltm", ".xlt", ".ods", ".fods", ".ots", ".docm", ".doc", ".dotx", ".dotm", ".dot", ".odt", ".fodt", ".ott", ".rtf" ],
"edited-docs": [ ".pptx", ".pptm", ".ppt", ".ppsx", ".ppsm", ".pps", ".potx", ".potm", ".pot", ".odp", ".fodp", ".otp", ".xlsx", ".xlsm", ".xls", ".xltx", ".xltm", ".xlt", ".ods", ".fods", ".ots", ".csv", ".docx", ".docxf", ".oform", ".docm", ".doc", ".dotx", ".dotm", ".dot", ".odt", ".fodt", ".ott", ".txt", ".rtf", ".mht", ".html", ".htm" ],
"encrypted-docs": [ ".docx", ".docxf", ".xlsx", ".pptx" ],
"encrypted-docs": [ ".docx", ".docxf", ".xlsx", ".pptx", ".oform" ],
"formfilling-docs": [ ".oform" ],
"customfilter-docs": [ ".xlsx" ],
"reviewed-docs": [ ".docx", ".docxf" ],

View File

@ -462,18 +462,18 @@ namespace ASC.Files.Core.Security
continue;
}
if (e.FileEntryType == FileEntryType.File
&& file.IsFillFormDraft)
{
e.Access = FileShare.FillForms;
//if (e.FileEntryType == FileEntryType.File
// && file.IsFillFormDraft)
//{
// e.Access = FileShare.FillForms;
if (action != FilesSecurityActions.Read
&& action != FilesSecurityActions.FillForms
&& action != FilesSecurityActions.Delete)
{
continue;
}
}
// if (action != FilesSecurityActions.Read
// && action != FilesSecurityActions.FillForms
// && action != FilesSecurityActions.Delete)
// {
// continue;
// }
//}
if (e.RootFolderType == FolderType.USER && e.RootFolderCreator == userId && !isVisitor)
{

View File

@ -1008,7 +1008,13 @@ namespace ASC.Web.Files.Utils
if (file.RootFolderType == FolderType.TRASH) throw new Exception(FilesCommonResource.ErrorMassage_ViewTrashItem);
var currentExt = file.ConvertedExtension;
if (string.IsNullOrEmpty(newExtension)) newExtension = FileUtility.GetInternalExtension(file.Title);
if (string.IsNullOrEmpty(newExtension))
{
if (currentExt != FileUtility.MasterFormExtension)
newExtension = FileUtility.GetInternalExtension(file.Title);
else
newExtension = currentExt;
}
var replaceVersion = false;
if (file.Forcesave != ForcesaveType.None)
@ -1037,7 +1043,12 @@ namespace ASC.Web.Files.Utils
{
path = FileConstant.NewDocPath + "en-US/";
}
path += "new" + FileUtility.GetInternalExtension(file.Title);
var fileExt = currentExt != FileUtility.MasterFormExtension
? FileUtility.GetInternalExtension(file.Title)
: currentExt;
path += "new" + fileExt;
//todo: think about the criteria for saving after creation
if (!storeTemplate.IsFile(path) || file.ContentLength != storeTemplate.GetFileSize("", path))