fix: use direct lookup context for pk;member <name> groups

This commit is contained in:
spiral 2021-12-23 23:11:55 -05:00
parent 546cdc93c4
commit cc0779e0e8
No known key found for this signature in database
GPG Key ID: A6059F0CA0E1BD31
2 changed files with 3 additions and 1 deletions

View File

@ -60,7 +60,7 @@ public class GroupMember
public async Task ListMemberGroups(Context ctx, PKMember target) public async Task ListMemberGroups(Context ctx, PKMember target)
{ {
var pctx = ctx.LookupContextFor(target.System); var pctx = ctx.DirectLookupContextFor(target.System);
var groups = await _repo.GetMemberGroups(target.Id) var groups = await _repo.GetMemberGroups(target.Id)
.Where(g => g.Visibility.CanAccess(pctx)) .Where(g => g.Visibility.CanAccess(pctx))

View File

@ -433,6 +433,8 @@ public class Groups
// TODO: integrate with the normal "search" system // TODO: integrate with the normal "search" system
// TODO: integrate with privacy config settings
var pctx = LookupContext.ByNonOwner; var pctx = LookupContext.ByNonOwner;
if (ctx.MatchFlag("a", "all")) if (ctx.MatchFlag("a", "all"))
{ {