Add group lists to member endpoints#10828
Open
charliepark wants to merge 2 commits into
Open
Conversation
charliepark
marked this pull request as draft
July 15, 2026 21:46
charliepark
marked this pull request as ready for review
July 15, 2026 23:28
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds a
groupsfield to theUserview in the external API, so that when you fetch a user (or list users), you get back the list of groups that user belongs to.This was initially prompted by console#3211, where we need to easily pull each user's groups, for determining their effective role, factoring in both their inherited role (from the silo), their assigned role (from the project), and their group memberships (from both the silo and the project). Without the changes in this PR, we calculate that by running a query for each group, then finding the group membership, then mapping it to each user. So I think this is an improvement. Downside is that it runs the additional group bundling on every user endpoint.
One question @david-crespo and I talked through a bit, though we didn't get deep into it, was whether the shape of the group should just be … a group … as opposed to what we have in this PR, which is an object of just the group name (a string) and the id (a UUID). The other elements of a Group object are the silo, which is the same as the user's silo, then the created_at and updated_at timstamps, which I'm not sure we'll use. With all of that, I think just the ID and name is fine, but I'm open to alternate takes.