Expose user email address to admins in group and project members API
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Problem to solve
Admins need ability to get group and project member email addresses easily via API.
Currently for example if you want to get project owner email addresses for a project you must:
- Find owners - overly complicated - feature request #230019, bug #219299 (closed)
- Pull project to see if it's a personal namespace project as indicated by
ownerbeing setGET /projects/:idhttps://docs.gitlab.com/ee/api/projects.html#get-single-project - If not personal namespace project
- Pull project members
GET /projects/:id/members/allhttps://docs.gitlab.com/ee/api/members.html - Client side, filter list to only owners
- Pull project members
- Pull project to see if it's a personal namespace project as indicated by
- Get owner email addresses
- For each owner get
emailviaGET /usershttps://docs.gitlab.com/ee/api/users.html#for-admins- Request is slower/larger than needed because can't use
GET /users/:id/emailshttps://docs.gitlab.com/ee/api/users.html#list-emails-for-user due to it missing users primary email address #25077 (closed)
- Request is slower/larger than needed because can't use
- For each owner get
Intended users
User experience goal
The admin should be able to easily get email addresses for members of group or project via API.
Proposal
Expose email in GET /groups/:id/members/* and GET /projects/:id/members/* endpoints https://docs.gitlab.com/ee/api/members.html
NOTE: This endpoint incorrectly shows that it returns an email already. It does not in most cases.
Further details
Permissions and Security
Documentation
Update examples at https://docs.gitlab.com/ee/api/members.html
Availability & Testing
What does success look like, and how can we measure that?
What is the type of buyer?
Is this a cross-stage feature?
Links / references
Edited by 🤖 GitLab Bot 🤖