Add Configuration Option for Mandatory public email
Problem to solve
Since https://gitlab.com/gitlab-org/gitlab-ce/issues/57253 we've decoupled public_email from email out of security concerns. However, some enterprise customers would like to enforce that everybody has a public email or, that everybody's corporate email is public.
Target audience
- Sidney, Systems Administrator, https://design.gitlab.com/research/personas#persona-sidney
- Sam, Security Analyst, https://design.gitlab.com/research/personas#persona-sam
Proposal
Introduce an instance level setting that, when selected by admins, uses each user's primary email address as their public email address.
Implementation plan
- Create a migration to add a column
enforce_public_emailinapplication_settings(something likedb/migrate/20250416144638_add_project_web_based_commit_signing_enabled_setting.rb) - Add the field to
visible_attributesinapp/helpers/application_settings_helper.rb - Add the new field to
app/views/admin/application_settings/_account_and_limit.html.haml(I think this is most logical place on admin -> settings -> general -> account and limit) - Expose
lib/api/entities/application_setting.rb - Allow updating via the API
lib/api/settings.rb
This can (and should be) broken up into multiple merge requests- perhaps:
- Add the database column
- Add to the UI
- Add to the API
Links / references
ZD https://gitlab.zendesk.com/agent/tickets/113781 (internal)
Edited by 🤖 GitLab Bot 🤖