mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 04:56:49 +00:00
fix(api): check visibility for group members in groups endpoint
This commit is contained in:
parent
b904be939a
commit
a39d0c8ab6
1 changed files with 6 additions and 2 deletions
|
|
@ -39,7 +39,11 @@ public class GroupControllerV2: PKControllerBase
|
||||||
|
|
||||||
if (with_members && j_groups.Count > 0)
|
if (with_members && j_groups.Count > 0)
|
||||||
{
|
{
|
||||||
var q = await _repo.GetGroupMemberInfo(await groups.Select(x => x.Id).ToListAsync());
|
var q = await _repo.GetGroupMemberInfo(await groups
|
||||||
|
.Where(g => g.Visibility.CanAccess(ctx))
|
||||||
|
.Select(x => x.Id)
|
||||||
|
.ToListAsync());
|
||||||
|
|
||||||
|
|
||||||
foreach (var row in q)
|
foreach (var row in q)
|
||||||
if (row.MemberVisibility.CanAccess(ctx))
|
if (row.MemberVisibility.CanAccess(ctx))
|
||||||
|
|
@ -147,4 +151,4 @@ public class GroupControllerV2: PKControllerBase
|
||||||
|
|
||||||
return NoContent();
|
return NoContent();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue