Expose user_ids in groups for approvers list

Context

(Identified in https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/9003)

There is a UX requirement to show the members count inline with the groups selected in the "Merge request approvals" settings.

approvals-settings--edit

What's the problem?

::API::Entities::Group does not provide this information. We need to expose a list of user id's so that we can calculate the count of unique members in a list of groups and users.

Options

Option 1: Form the server, expose user_ids in ::API::Entities::Group.

Maybe we can exclude this by default, but only expose it if a certain flag is present (i.e. ?scope=full)?

Option 2: From the client, request group/:id/members for each group.

This will have a noticeable performance hit on the client. We can potentially optimize this by memoizing the calls, but that also comes with a memory tradeoff on the client.

Proposal

Let's go with option 1 and expose user_ids from ::API::Entities::Group.

Edited Jan 04, 2019 by Paul Slaughter
Assignee Loading
Time tracking Loading