feat: rework group list into member list

This commit is contained in:
rladenson
2022-01-14 22:30:02 -05:00
committed by spiral
parent 0afe031284
commit f3869dbcbe
21 changed files with 374 additions and 126 deletions

View File

@@ -64,7 +64,7 @@ public class GroupMember
var groups = await _repo.GetMemberGroups(target.Id)
.Where(g => g.Visibility.CanAccess(pctx))
.OrderBy(g => g.Name, StringComparer.InvariantCultureIgnoreCase)
.OrderBy(g => (g.DisplayName ?? g.Name), StringComparer.InvariantCultureIgnoreCase)
.ToListAsync();
var description = "";
@@ -97,7 +97,7 @@ public class GroupMember
.ToList();
var existingMembersInGroup = (await _db.Execute(conn => conn.QueryMemberList(target.System,
new DatabaseViewsExt.MemberListQueryOptions { GroupFilter = target.Id })))
new DatabaseViewsExt.ListQueryOptions { GroupFilter = target.Id })))
.Select(m => m.Id.Value)
.Distinct()
.ToHashSet();
@@ -134,7 +134,7 @@ public class GroupMember
var targetSystem = await GetGroupSystem(ctx, target);
ctx.CheckSystemPrivacy(targetSystem.Id, target.ListPrivacy);
var opts = ctx.ParseMemberListOptions(ctx.DirectLookupContextFor(target.System));
var opts = ctx.ParseListOptions(ctx.DirectLookupContextFor(target.System));
opts.GroupFilter = target.Id;
var title = new StringBuilder($"Members of {target.DisplayName ?? target.Name} (`{target.Hid}`) in ");