Skip to content

Commit

Permalink
fix Bug 65846
Browse files Browse the repository at this point in the history
  • Loading branch information
pavelbannov committed Jan 15, 2024
1 parent 29e16e5 commit 6521518
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
9 changes: 4 additions & 5 deletions products/ASC.Files/Core/Core/FileStorageService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2568,7 +2568,7 @@ public async Task<AceWrapper> GetPrimaryExternalLinkAsync<T>(T entryId, FileEntr
return link;
}

public async Task<string> SetAceObjectAsync<T>(AceCollection<T> aceCollection, bool notify, string culture = null)
public async Task<string> SetAceObjectAsync<T>(AceCollection<T> aceCollection, bool notify, string culture = null, bool socket = true)
{
var fileDao = GetFileDao<T>();
var folderDao = GetFolderDao<T>();
Expand All @@ -2590,7 +2590,7 @@ public async Task<string> SetAceObjectAsync<T>(AceCollection<T> aceCollection, b
{
try
{
var result = await _fileSharingAceHelper.SetAceObjectAsync(aceCollection.Aces, entry, notify, aceCollection.Message, aceCollection.AdvancedSettings, culture);
var result = await _fileSharingAceHelper.SetAceObjectAsync(aceCollection.Aces, entry, notify, aceCollection.Message, aceCollection.AdvancedSettings, culture, socket);
warning ??= result.Warning;

if (!result.Changed)
Expand Down Expand Up @@ -3059,7 +3059,7 @@ await SetAceObjectAsync(new AceCollection<T>
Id = createBy
}
}
}, false);
}, false, socket: false);

var folderAccess = folder.Access;

Expand All @@ -3068,8 +3068,7 @@ await SetAceObjectAsync(new AceCollection<T>
var newFolderID = await folderDao.SaveFolderAsync(newFolder);
newFolder = await folderDao.GetFolderAsync(newFolderID);
newFolder.Access = folderAccess;

await _socketManager.CreateFolderAsync(newFolder);

await _entryStatusManager.SetIsFavoriteFolderAsync(folder);

await _filesMessageService.SendAsync(MessageAction.FileChangeOwner, newFolder, new[] { newFolder.Title, userInfo.DisplayUserName(false, _displayUserSettingsHelper) });
Expand Down
4 changes: 2 additions & 2 deletions products/ASC.Files/Core/Utils/FileSharing.cs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public FileSharingAceHelper(
_socketManager = socketManager;
}

public async Task<AceProcessingResult> SetAceObjectAsync<T>(List<AceWrapper> aceWrappers, FileEntry<T> entry, bool notify, string message, AceAdvancedSettingsWrapper advancedSettings, string culture = null)
public async Task<AceProcessingResult> SetAceObjectAsync<T>(List<AceWrapper> aceWrappers, FileEntry<T> entry, bool notify, string message, AceAdvancedSettingsWrapper advancedSettings, string culture = null, bool socket = true)
{
if (entry == null)
{
Expand Down Expand Up @@ -263,7 +263,7 @@ public async Task<AceProcessingResult> SetAceObjectAsync<T>(List<AceWrapper> ace
}

await _fileSecurity.ShareAsync(entry.Id, entryType, w.Id, share, w.SubjectType, w.FileShareOptions);
if (room != null)
if (socket && room != null)
{
if (share == FileShare.None)
{
Expand Down

0 comments on commit 6521518

Please sign in to comment.