Skip to content

Fix inherited member source not visible to subgroup members

Abdul Wadood requested to merge 455884-unmask-inherited-members into master

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
image image

How to set up and validate locally

  1. Create a Parent group and its subgroup Child.
  2. Add a new user User2 to Child.
  3. Login using User2 and go to the members page of the Child.
  4. 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