Allow flags to be toggled on for all users in a group
What are we trying to solve?
When rolling out system-wide changes such as the Web IDE, the font redesign, and the navigation; we need a way to enable feature flags for all users in a group. Most commonly, gitlab-org
.
Currently, we can pass a series of usernames but this is problematic with large groups such as gitlab-org
and prone to human error.
Proposal
Add a --group-members
flag that takes a group name as a string, fetches all the direct members of that group, then toggles the flag for all those users.
We can get a (paginated) list of these members using the GitLab API endpoint https://gitlab.com/api/v4/groups/<GROUP_ID>/members
then loop through all these and pass all the usernames to the usual --users
flag.