Fix inherited member source not visible to subgroup members
What does this MR do and why?
In !144638 (merged), we introduced a bug due to which we started masking the parent group members from the subgroup members when the visibility of these groups were private.
To check if the member is from an ancestor we should check whether the current source contains the member's source ID in its traversal IDs but we were doing the opposite. The specs had a gap because we were only testing public groups there and this problem only occurred for private groups.
I have also added a feature spec to cover this case.
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
Before | After |
---|---|
![]() |
![]() |
How to set up and validate locally
- Create a Parent group and its subgroup Child.
- Add a new user
User2
to Child. - Login using User2 and go to the members page of the Child.
- On the master branch the Parent group member's source would be masked with Private but on this branch, it should be visible.
Related to #455884 (closed)
Merge request reports
Activity
changed milestone to %17.0
assigned to @abdwdd
mentioned in issue #455884 (closed)
- A deleted user
added backend label
Reviewer roulette
Category Reviewer Maintainer backend @j_lar
(UTC+2, 3.5 hours behind author)
@brodock
(UTC+1, 4.5 hours behind author)
test for spec/features/*
@j_lar
(UTC+2, 3.5 hours behind author)
Maintainer review is optional for test for spec/features/*
Please check reviewer's status!
Please refer to documentation page for guidance on how you can benefit from the Reviewer Roulette, or use the GitLab Review Workload Dashboard to find other available reviewers.
If needed, you can retry the
danger-review
job that generated this comment.Generated by
DangerEdited by Ghost User- Resolved by Gabriel Mazetto
requested review from @j_lar
added 188 commits
-
6b7bd1ba...dbb78d77 - 187 commits from branch
master
- 1e6e7d52 - Fix inherited member source not visible to subgroup members
-
6b7bd1ba...dbb78d77 - 187 commits from branch
- Resolved by Gabriel Mazetto
removed review request for @j_lar
added 1 commit
- 5a520497 - Use the new factory syntax to pass members to groups
requested review from @brodock
- Resolved by Gabriel Mazetto
added pipeline:mr-approved label
- Resolved by Gabriel Mazetto
@brodock
, thanks for approving this merge request.This is the first time the merge request has been approved. To ensure we don't only run predictive pipelines, and we don't break
master
, a new pipeline will be started shortly.Please wait for the pipeline to start before resolving this discussion and set auto-merge for the new pipeline. See merging a merge request for more details.
@abdwdd LGTM! I've set it to MWPS