Skip to content

Commit

Permalink
fixed admin group security changing/view
Browse files Browse the repository at this point in the history
  • Loading branch information
MaksimChegulov committed Dec 2, 2024
1 parent 1290873 commit 1aef5fc
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions products/ASC.Files/Core/Utils/FileSharing.cs
Original file line number Diff line number Diff line change
Expand Up @@ -800,14 +800,13 @@ public async IAsyncEnumerable<GroupMemberSecurity> GetGroupMembersAsync<T>(FileE
await foreach (var member in securityDao.GetGroupMembersWithSecurityAsync(entry, groupId, text, offset, count))
{
var isOwner = entry.CreateBy == member.UserId;
var isDocSpaceAdmin = await userManager.IsDocSpaceAdminAsync(member.UserId);

yield return new GroupMemberSecurity
{
User = await userManager.GetUsersAsync(member.UserId),
GroupShare = member.GroupShare,
UserShare = isOwner || isDocSpaceAdmin ? FileShare.RoomManager : member.UserShare,
CanEditAccess = canEditAccess && !isOwner && userId != member.UserId && !isDocSpaceAdmin,
UserShare = isOwner ? FileShare.RoomManager : member.UserShare,
CanEditAccess = canEditAccess && !isOwner && userId != member.UserId,
Owner = isOwner
};
}
Expand Down

0 comments on commit 1aef5fc

Please sign in to comment.