groupUsersSearch doesn't return users with inherited membership
Summary
Originally reported via this (internal only) ticket by a GitLab Premium customer.
Issue boards use the groupUsersSearch
graphql query to find users when editing a board:
The below query is used:
query groupUsersSearch($search: String!, $fullPath: ID!, $after: String, $first: Int) {
workspace: group(fullPath: $fullPath) {
id
users: groupMembers(
search: $search
relations: [DIRECT, DESCENDANTS, INHERITED]
first: $first
after: $after
sort: USER_FULL_NAME_ASC
) {
pageInfo {
hasNextPage
endCursor
startCursor
__typename
}
nodes {
id
user {
...User
...UserAvailability
__typename
}
__typename
}
__typename
}
__typename
}
}
fragment User on User {
id
avatarUrl
name
username
webUrl
__typename
}
fragment UserAvailability on User {
status {
availability
__typename
}
__typename
}
The above query only returns direct members of the group. The expectation is that if a group is invited, then all members of the now invited group would also be displayed.
Steps to reproduce
- Create GroupA and GroupB, add members to GroupB
- Create a issue board in GroupA
- Invite GroupB to GroupA
- Edit issue board in GroupA, members of GroupB are not displayed.
Example Project
What is the current bug behavior?
Members of the group via a group invite are not displayed.
What is the expected correct behavior?
All group members should be displayed / returned.
Relevant logs and/or screenshots
See above
Output of checks
This bug happens on GitLab.com