Draft: Hide the display of email addresses on the user profile page for specific groups
What does this MR do and why?
This MR will hide the display of a user's public email if any group they belong to has email_visibility_disabled
set to true
.
The intent is groups that a user belongs to can still opt to hide the visibility of a group member's public email.
Screenshots or screen recordings
User who does NOT belong to any group that has attr set to true | User who has belongs to a group with attr set to true |
---|---|
How to set up and validate locally
- Run db migrations
bin/rails db:migrate RAILS_ENV=development
- In rails console
Feature.enable(:hide_public_email_on_profile)
- Pick a group to test on, e.g., Flightjs (ID 26)
- In rails console
group = Namespace.find(26) group.update_attribute(:email_visibility_disabled, true)
- Pick from group's users to test on. Impersonate them, and set their email as a public one to use in their profile settings.
- I use
rob
(http://localhost:3000/admin/users/rob), as he belongs to multiple groups, includingFlightjs
- I use
- Select a control user, e.g.,
donette
(http://localhost:3000/admin/users/donette), who does not belong toFlightjs
. Make sure they also have a public email set. - View the profiles of
rob
anddonette
.- Observe that
rob
's email does not display even though it is set as public. - Observe that
donette
is displayed since it is set as public.
- Observe that
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Dennis Tang