summaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/auth/user_form.go25
-rw-r--r--modules/setting/setting.go4
2 files changed, 18 insertions, 11 deletions
diff --git a/modules/auth/user_form.go b/modules/auth/user_form.go
index f020f365d2..1fa5b55c67 100644
--- a/modules/auth/user_form.go
+++ b/modules/auth/user_form.go
@@ -38,12 +38,14 @@ type InstallForm struct {
RegisterConfirm bool
MailNotify bool
- OfflineMode bool
- DisableGravatar bool
- EnableFederatedAvatar bool
- DisableRegistration bool
- EnableCaptcha bool
- RequireSignInView bool
+ OfflineMode bool
+ DisableGravatar bool
+ EnableFederatedAvatar bool
+ DisableRegistration bool
+ EnableCaptcha bool
+ RequireSignInView bool
+ DefaultKeepEmailPrivate bool
+ NoReplyAddress string
AdminName string `binding:"OmitEmpty;AlphaDashDot;MaxSize(30)" locale:"install.admin_name"`
AdminPasswd string `binding:"OmitEmpty;MaxSize(255)" locale:"install.admin_password"`
@@ -97,11 +99,12 @@ func (f *SignInForm) Validate(ctx *macaron.Context, errs binding.Errors) binding
// UpdateProfileForm form for updating profile
type UpdateProfileForm struct {
- Name string `binding:"OmitEmpty;MaxSize(35)"`
- FullName string `binding:"MaxSize(100)"`
- Email string `binding:"Required;Email;MaxSize(254)"`
- Website string `binding:"Url;MaxSize(100)"`
- Location string `binding:"MaxSize(50)"`
+ Name string `binding:"OmitEmpty;MaxSize(35)"`
+ FullName string `binding:"MaxSize(100)"`
+ Email string `binding:"Required;Email;MaxSize(254)"`
+ KeepEmailPrivate bool
+ Website string `binding:"Url;MaxSize(100)"`
+ Location string `binding:"MaxSize(50)"`
}
// Validate valideates the fields
diff --git a/modules/setting/setting.go b/modules/setting/setting.go
index 9a8a52e195..aedeb55285 100644
--- a/modules/setting/setting.go
+++ b/modules/setting/setting.go
@@ -838,6 +838,8 @@ var Service struct {
EnableReverseProxyAuth bool
EnableReverseProxyAutoRegister bool
EnableCaptcha bool
+ DefaultKeepEmailPrivate bool
+ NoReplyAddress string
}
func newService() {
@@ -850,6 +852,8 @@ func newService() {
Service.EnableReverseProxyAuth = sec.Key("ENABLE_REVERSE_PROXY_AUTHENTICATION").MustBool()
Service.EnableReverseProxyAutoRegister = sec.Key("ENABLE_REVERSE_PROXY_AUTO_REGISTRATION").MustBool()
Service.EnableCaptcha = sec.Key("ENABLE_CAPTCHA").MustBool()
+ Service.DefaultKeepEmailPrivate = sec.Key("DEFAULT_KEEP_EMAIL_PRIVATE").MustBool()
+ Service.NoReplyAddress = sec.Key("NO_REPLY_ADDRESS").MustString("noreply.example.org")
}
var logLevels = map[string]string{