[PR #571] [MERGED] Keep email private #15461

Closed
opened 2025-11-02 11:47:03 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/go-gitea/gitea/pull/571
Author: @derSuessmann
Created: 1/3/2017
Status: Merged
Merged: 1/8/2017
Merged by: @lunny

Base: masterHead: keep-email-private


📝 Commits (1)

📊 Changes

12 files changed (+88 additions, -28 deletions)

View changed files

📝 conf/app.ini (+7 -0)
📝 models/user.go (+27 -15)
📝 modules/auth/user_form.go (+14 -11)
📝 modules/setting/setting.go (+4 -0)
📝 options/locale/locale_en-US.ini (+8 -0)
📝 routers/install.go (+4 -0)
📝 routers/user/setting.go (+1 -0)
📝 templates/admin/config.tmpl (+4 -0)
📝 templates/explore/users.tmpl (+1 -1)
📝 templates/install.tmpl (+11 -0)
📝 templates/user/profile.tmpl (+1 -1)
📝 templates/user/settings/profile.tmpl (+6 -0)

📄 Description

This PR addresses issue #537. It fulfills the follwing requirements:

User requirement
The user of Gitea may want to keep his email address private from other users to prevent email harvesting for UCE or stalking.

Change requirements

  • The change must not change the behavior of an updated installation (REQ1). If an existing installation is updated with the changed version, the email address of all users will still be visible until they change their settings.
  • The change must enable a user of Gitea to decide whether his email address will be shown (REQ2). This should be implemented as a user setting in the Profile section below the Email address. The option should be called "Keep Email Private" in the dialog and KeepEmailPrivate as a field in the user struct.
  • The change must introduce a new site-wide option DEFAULT_KEEP_EMAIL_PRIVATE (REQ3). If the option is true all new user will get KeepEmailPrivate set to true, otherwise false.
  • The email address must not be shown to other users on the explore/users and users profile pages if KeepEmailPrivate is true (REQ4).
  • The email address should be replaced with a concatenation of the user name in lower case, "@" and a domain name from the settings (<LowerName>@<NO_REPLY_ADDRESS>) in the git log, if KeepEmailPrivate is true (REQ5-NEW).
  • An ApiFormat() call should return the same email address as shown in the git log (REQ6). This requirement is linked to (REQ5).
  • The value of DEFAULT_KEEP_EMAIL_PRIVATE should be set on the install page (REQ6).
  • There should be a site-wide setting for the NO_REPLY_ADDRESS (REQ7).
  • The change does not differentiate between what is visible to an administrator and a normal user on the explore/users and users' profile pages.
  • This change does not provide other translations than English.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/go-gitea/gitea/pull/571 **Author:** [@derSuessmann](https://github.com/derSuessmann) **Created:** 1/3/2017 **Status:** ✅ Merged **Merged:** 1/8/2017 **Merged by:** [@lunny](https://github.com/lunny) **Base:** `master` ← **Head:** `keep-email-private` --- ### 📝 Commits (1) - [`0711095`](https://github.com/go-gitea/gitea/commit/07110954df6ee47d65d9154b9d2f6729dd831e90) Add Keep email private (see issue #571). ### 📊 Changes **12 files changed** (+88 additions, -28 deletions) <details> <summary>View changed files</summary> 📝 `conf/app.ini` (+7 -0) 📝 `models/user.go` (+27 -15) 📝 `modules/auth/user_form.go` (+14 -11) 📝 `modules/setting/setting.go` (+4 -0) 📝 `options/locale/locale_en-US.ini` (+8 -0) 📝 `routers/install.go` (+4 -0) 📝 `routers/user/setting.go` (+1 -0) 📝 `templates/admin/config.tmpl` (+4 -0) 📝 `templates/explore/users.tmpl` (+1 -1) 📝 `templates/install.tmpl` (+11 -0) 📝 `templates/user/profile.tmpl` (+1 -1) 📝 `templates/user/settings/profile.tmpl` (+6 -0) </details> ### 📄 Description This PR addresses issue #537. It fulfills the follwing requirements: **User requirement** The user of Gitea may want to keep his email address private from other users to prevent email harvesting for UCE or stalking. **Change requirements** - The change _must not_ change the behavior of an updated installation (REQ1). If an existing installation is updated with the changed version, the email address of all users will still be visible until they change their settings. - The change _must_ enable a user of Gitea to decide whether his email address will be shown (REQ2). This _should_ be implemented as a user setting in the Profile section below the Email address. The option _should_ be called "Keep Email Private" in the dialog and `KeepEmailPrivate` as a field in the user struct. - The change _must_ introduce a new site-wide option `DEFAULT_KEEP_EMAIL_PRIVATE` (REQ3). If the option is true all new user will get `KeepEmailPrivate` set to true, otherwise false. - The email address _must not_ be shown to other users on the explore/users and users profile pages if `KeepEmailPrivate` is true (REQ4). - The email address should be replaced with a concatenation of the user name in lower case, "@" and a domain name from the settings (`<LowerName>@<NO_REPLY_ADDRESS>`) in the git log, if `KeepEmailPrivate` is true (REQ5-NEW). - An `ApiFormat()` call _should_ return the same email address as shown in the git log (REQ6). This requirement is linked to (REQ5). - The value of `DEFAULT_KEEP_EMAIL_PRIVATE` _should_ be set on the install page (REQ6). - There _should_ be a site-wide setting for the `NO_REPLY_ADDRESS` (REQ7). - The change _does not_ differentiate between what is visible to an administrator and a normal user on the explore/users and users' profile pages. - This change _does not_ provide other translations than English. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2025-11-02 11:47:03 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#15461