Selectively hide public email on profile page
What does this MR do and why?
This MR will hide the display of a user's public email if the feature flag hide_public_email_on_profile
has been set to true for the group actor equal to the value of the user's provisioned_by_group
.
This is a short term work around.
Screenshots or screen recordings
Feature flag disabled | Feature flag enabled for provisioned_by_group |
---|---|
How to set up and validate locally
- In rails console
group = FactoryBot.create(:group) scim_identity = FactoryBot.create(:scim_identity, group: group) user = FactoryBot.create(:user, :public_email, provisioned_by_group_id: scim_identity.group.id) Feature.disable(:hide_public_email_on_profile)
- Visit profile page for
user
E.g. http://localhost:3000/test-user - Observe user email is displayed.
- In rails console
Feature.enable(:hide_public_email_on_profile, group)
- Observe user email is not displayed.
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 Alex Pooley