summaryrefslogtreecommitdiffstats
path: root/modules/setting/setting.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/setting/setting.go')
-rw-r--r--modules/setting/setting.go32
1 files changed, 18 insertions, 14 deletions
diff --git a/modules/setting/setting.go b/modules/setting/setting.go
index a5908bacaa..00aaad6913 100644
--- a/modules/setting/setting.go
+++ b/modules/setting/setting.go
@@ -34,7 +34,7 @@ import (
"github.com/go-macaron/session"
_ "github.com/go-macaron/session/redis" // redis plugin for store session
"github.com/go-xorm/core"
- ini "gopkg.in/ini.v1"
+ "gopkg.in/ini.v1"
"strk.kbt.io/projects/go/libravatar"
)
@@ -1016,19 +1016,21 @@ func NewContext() {
// Service settings
var Service struct {
- ActiveCodeLives int
- ResetPwdCodeLives int
- RegisterEmailConfirm bool
- DisableRegistration bool
- ShowRegistrationButton bool
- RequireSignInView bool
- EnableNotifyMail bool
- EnableReverseProxyAuth bool
- EnableReverseProxyAutoRegister bool
- EnableCaptcha bool
- DefaultKeepEmailPrivate bool
- DefaultAllowCreateOrganization bool
- NoReplyAddress string
+ ActiveCodeLives int
+ ResetPwdCodeLives int
+ RegisterEmailConfirm bool
+ DisableRegistration bool
+ ShowRegistrationButton bool
+ RequireSignInView bool
+ EnableNotifyMail bool
+ EnableReverseProxyAuth bool
+ EnableReverseProxyAutoRegister bool
+ EnableCaptcha bool
+ DefaultKeepEmailPrivate bool
+ DefaultAllowCreateOrganization bool
+ DefaultEnableTimetracking bool
+ DefaultAllowOnlyContributorsToTrackTime bool
+ NoReplyAddress string
// OpenID settings
EnableOpenIDSignIn bool
@@ -1049,6 +1051,8 @@ func newService() {
Service.EnableCaptcha = sec.Key("ENABLE_CAPTCHA").MustBool()
Service.DefaultKeepEmailPrivate = sec.Key("DEFAULT_KEEP_EMAIL_PRIVATE").MustBool()
Service.DefaultAllowCreateOrganization = sec.Key("DEFAULT_ALLOW_CREATE_ORGANIZATION").MustBool(true)
+ Service.DefaultEnableTimetracking = sec.Key("DEFAULT_ENABLE_TIMETRACKING").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")
sec = Cfg.Section("openid")