mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 13:06:50 +00:00
fix: check 'with_members' in /systems/:ref/groups against member list privacy
This commit is contained in:
parent
0ca356eec3
commit
85c095a115
1 changed files with 3 additions and 0 deletions
|
|
@ -39,6 +39,9 @@ namespace PluralKit.API
|
|||
.Select(g => g.ToJson(ctx, needsMembersArray: with_members))
|
||||
.ToListAsync();
|
||||
|
||||
if (with_members && !system.MemberListPrivacy.CanAccess(ctx))
|
||||
throw Errors.UnauthorizedMemberList;
|
||||
|
||||
if (with_members && j_groups.Count > 0)
|
||||
{
|
||||
var q = await _repo.GetGroupMemberInfo(await groups.Select(x => x.Id).ToListAsync());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue