fixed change owner
This commit is contained in:
parent
00c3d8a367
commit
63a09852d6
@ -2926,6 +2926,11 @@ public class FileStorageService //: IFileStorageService
|
||||
{
|
||||
Access = FileShare.None,
|
||||
Id = userInfo.Id
|
||||
},
|
||||
new AceWrapper()
|
||||
{
|
||||
Access = FileShare.RoomAdmin,
|
||||
Id = createBy
|
||||
}
|
||||
}
|
||||
}, false);
|
||||
@ -2940,19 +2945,6 @@ public class FileStorageService //: IFileStorageService
|
||||
|
||||
await _socketManager.CreateFolderAsync(newFolder);
|
||||
await _entryStatusManager.SetIsFavoriteFolderAsync(folder);
|
||||
await SetAceObjectAsync(new AceCollection<T>
|
||||
{
|
||||
Files = Array.Empty<T>(),
|
||||
Folders = new[] { newFolderID },
|
||||
Aces = new List<AceWrapper>
|
||||
{
|
||||
new AceWrapper()
|
||||
{
|
||||
Access = FileShare.RoomAdmin,
|
||||
Id = createBy
|
||||
}
|
||||
}
|
||||
}, false);
|
||||
|
||||
_ = _filesMessageService.SendAsync(newFolder, GetHttpHeaders(), MessageAction.FileChangeOwner, new[] { newFolder.Title, userInfo.DisplayUserName(false, _displayUserSettingsHelper) });
|
||||
}
|
||||
|
@ -199,8 +199,7 @@ public class FileSharingAceHelper
|
||||
|
||||
var subjects = await _fileSecurity.GetUserSubjectsAsync(w.Id);
|
||||
|
||||
if (entry.RootFolderType == FolderType.COMMON && subjects.Contains(Constants.GroupAdmin.ID)
|
||||
|| ownerId == w.Id)
|
||||
if (entry.RootFolderType == FolderType.COMMON && subjects.Contains(Constants.GroupAdmin.ID))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@ -587,7 +586,7 @@ public class FileSharing
|
||||
result.Add(w);
|
||||
}
|
||||
|
||||
if (isRoom && canEditAccess&& !withoutTemplates)
|
||||
if (isRoom && canEditAccess && !withoutTemplates)
|
||||
{
|
||||
var invitationId = Guid.NewGuid();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user