From a7684224bc3843ca5399ec67f9aa8d0523fe231b Mon Sep 17 00:00:00 2001 From: pavelbannov Date: Tue, 26 Dec 2023 14:07:40 +0300 Subject: [PATCH] fix --- .../WCFService/FileOperations/FileMoveCopyOperation.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/products/ASC.Files/Core/Services/WCFService/FileOperations/FileMoveCopyOperation.cs b/products/ASC.Files/Core/Services/WCFService/FileOperations/FileMoveCopyOperation.cs index 213f3bf8f76..0e49156c2de 100644 --- a/products/ASC.Files/Core/Services/WCFService/FileOperations/FileMoveCopyOperation.cs +++ b/products/ASC.Files/Core/Services/WCFService/FileOperations/FileMoveCopyOperation.cs @@ -211,7 +211,10 @@ private async Task DoAsync(IServiceScope scope, TTo tto) var moveOrCopyFilesTask = await MoveOrCopyFilesAsync(scope, Files, toFolder, _copy, parentFolders); needToMark.AddRange(moveOrCopyFilesTask); - + + var admins = await userManager.GetUsers(true, EmployeeStatus.Active, null, null, null, null, null, null, null, true, 0, 0).Select(r=> r.Id).ToListAsync(); + admins.Add(CurrentTenant.OwnerId); + foreach (var folder in moveOrCopyFoldersTask) { if (toFolder.FolderType != FolderType.Archive && !DocSpaceHelper.IsRoom(folder.FolderType)) @@ -220,8 +223,6 @@ private async Task DoAsync(IServiceScope scope, TTo tto) } var whoCanRead = await fileSecurity.WhoCanReadAsync(folder); - var admins = await userManager.GetUsers(true, EmployeeStatus.Active, null, null, null, null, null, null, null, true, 0, 0).Select(r=> r.Id).ToListAsync(); - admins.Add(CurrentTenant.OwnerId); await socketManager.CreateFolderAsync(folder, admins.Concat(whoCanRead).Distinct().ToList()); }