aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzeripath <art27@cantab.net>2019-12-14 04:14:43 +0000
committertechknowlogick <techknowlogick@gitea.io>2019-12-13 23:14:43 -0500
commitf6ba912cd6e1868e8f66c5a38cbe317f243d7806 (patch)
tree9bfe3bf4501b10eadccf304945aaeb7b206b667b
parentbfcce5f86ccd46d18b6ca53889b04cc3b13fd2d8 (diff)
downloadgitea-f6ba912cd6e1868e8f66c5a38cbe317f243d7806.tar.gz
gitea-f6ba912cd6e1868e8f66c5a38cbe317f243d7806.zip
Default NO_REPLY_ADDRESS to DOMAIN (#9325)
* Default NO_REPLY_ADDRESS to DOMAIN The default NO_REPLY_ADDRESS was previously noreply.example.org This PR changes this to default to the default DOMAIN for gitea. * Change default to noreply.%(DOMAIN)s * Change default to "noreply" + Domain
-rw-r--r--custom/conf/app.ini.sample2
-rw-r--r--docs/content/doc/advanced/config-cheat-sheet.en-us.md2
-rw-r--r--modules/setting/service.go2
3 files changed, 4 insertions, 2 deletions
diff --git a/custom/conf/app.ini.sample b/custom/conf/app.ini.sample
index 050a0db730..62ccda2306 100644
--- a/custom/conf/app.ini.sample
+++ b/custom/conf/app.ini.sample
@@ -504,7 +504,7 @@ DEFAULT_ALLOW_ONLY_CONTRIBUTORS_TO_TRACK_TIME = true
; Default value for the domain part of the user's email address in the git log
; if he has set KeepEmailPrivate to true. The user's email will be replaced with a
; concatenation of the user name in lower case, "@" and NO_REPLY_ADDRESS.
-NO_REPLY_ADDRESS = noreply.example.org
+NO_REPLY_ADDRESS = noreply.%(DOMAIN)s
; Show Registration button
SHOW_REGISTRATION_BUTTON = true
; Default value for AutoWatchNewRepos
diff --git a/docs/content/doc/advanced/config-cheat-sheet.en-us.md b/docs/content/doc/advanced/config-cheat-sheet.en-us.md
index ee63b11b37..639f60fe5d 100644
--- a/docs/content/doc/advanced/config-cheat-sheet.en-us.md
+++ b/docs/content/doc/advanced/config-cheat-sheet.en-us.md
@@ -312,6 +312,8 @@ relation to port exhaustion.
- `DEFAULT_ORG_VISIBILITY`: **public**: Set default visibility mode for organisations, either "public", "limited" or "private".
- `DEFAULT_ORG_MEMBER_VISIBLE`: **false** True will make the membership of the users visible when added to the organisation.
- `ALLOW_ONLY_EXTERNAL_REGISTRATION`: **false** Set to true to force registration only using third-party services.
+- `NO_REPLY_ADDRESS`: **DOMAIN** Default value for the domain part of the user's email address in the git log if he has set KeepEmailPrivate to true.
+ The user's email will be replaced with a concatenation of the user name in lower case, "@" and NO_REPLY_ADDRESS.
## Webhook (`webhook`)
diff --git a/modules/setting/service.go b/modules/setting/service.go
index 6cbee8234d..9407231ac6 100644
--- a/modules/setting/service.go
+++ b/modules/setting/service.go
@@ -83,7 +83,7 @@ func newService() {
Service.DefaultEnableDependencies = sec.Key("DEFAULT_ENABLE_DEPENDENCIES").MustBool(true)
Service.AllowCrossRepositoryDependencies = sec.Key("ALLOW_CROSS_REPOSITORY_DEPENDENCIES").MustBool(true)
Service.DefaultAllowOnlyContributorsToTrackTime = sec.Key("DEFAULT_ALLOW_ONLY_CONTRIBUTORS_TO_TRACK_TIME").MustBool(true)
- Service.NoReplyAddress = sec.Key("NO_REPLY_ADDRESS").MustString("noreply.example.org")
+ Service.NoReplyAddress = sec.Key("NO_REPLY_ADDRESS").MustString("noreply." + Domain)
Service.EnableUserHeatmap = sec.Key("ENABLE_USER_HEATMAP").MustBool(true)
Service.AutoWatchNewRepos = sec.Key("AUTO_WATCH_NEW_REPOS").MustBool(true)
Service.AutoWatchOnChanges = sec.Key("AUTO_WATCH_ON_CHANGES").MustBool(false)