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?
-
Changelog entry added, if necessary -
Documentation created/updated -
Tests added for this feature/bug -
Tested in all supported browsers -
Conforms to the code review guidelines -
Conforms to the merge request performance guidelines -
Conforms to the style guides -
Conforms to the database guides -
Link to e2e tests MR added if this MR has Requires e2e tests label. See the Test Planning Process. -
Security reports checked/validated by reviewer
Closes #51854 (closed)
Edited by 🙈 jacopo beschi 🙉