Skip to content

Resolve "API to get all project/group members returns duplicates"

What does this MR do?

When using the GET api/v4/projects/:id/members/all API the same user was returned multiple times when he was a member of the project/group and also of one of the ancestor groups.

Now the member is returned only once giving priority to the membership on the project and maintaining the same behaviour of the members UI.

Info for the reviewer

I've noted that both in members API and in the members UI we return the members.access_level but not the real access_level that the user has on the project/group. In fact the real permission is the one set inside the projects_authorizations.access_level table. Is that allright? Shall we consider to use projects_authorizations.access_level rather than members.access_level?

Does this MR meet the acceptance criteria?

Closes #51854 (closed)

Edited by 🙈 jacopo beschi 🙉

Merge request reports