Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
pavelbannov committed Dec 26, 2023
1 parent db2c585 commit a768422
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,10 @@ private async Task DoAsync<TTo>(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))
Expand All @@ -220,8 +223,6 @@ private async Task DoAsync<TTo>(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());
}

Expand Down

0 comments on commit a768422

Please sign in to comment.