Skip to content

Hide private group names and source in members page

Thong Kuah requested to merge hide_private_shared_with_groups into master

What does this MR do and why?

Related issue: #415165 (closed)

Hide private group names in members page

If an invited group in project / group members page is not visible by the current user, we mask the group name, and membership source.

Visibility is determined by:

  • the current user can read the invited group, or
  • the current user is a member of the project / group.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After
Project membership, User is member of project: Screenshot_2023-10-25_at_5.09.35_PM Screenshot_2023-10-25_at_10.19.43_AM
Project membership, user Logged out: Screenshot_2023-10-25_at_5.10.27_PM Screenshot_2023-10-25_at_10.19.56_AM
Group membership, User is member of group: Screenshot_2023-10-25_at_5.11.31_PM Screenshot_2023-10-25_at_10.21.55_AM
Group membership, user Logged out: Screenshot_2023-10-25_at_5.11.54_PM Screenshot_2023-10-25_at_10.22.13_AM

How to set up and validate locally

** Group membership

  1. Create a top-level public group. Let's call it public-a
  2. Create a top-level private group. Let's call this private-a
  3. Go to public-a group. Go to the group's Manage, Members page. Click Invite a group. Invite the private-a group.
  4. In an incognito window, open the same page. You should see the private group name's as Private now.

** Project membership

  1. Create another top-level private group. Let's this private-b
  2. Create a new project in public-a group.
  3. For this project, go to Manage, Members page. Click Invite a group. Invite the private-b group.
  4. In an incognito window, open the same page. You should see the private group name's as Private now.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Thong Kuah

Merge request reports