summaryrefslogtreecommitdiffstats
path: root/modules/setting
diff options
context:
space:
mode:
Diffstat (limited to 'modules/setting')
-rw-r--r--modules/setting/setting.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/modules/setting/setting.go b/modules/setting/setting.go
index 9ba3e5a666..af1a282429 100644
--- a/modules/setting/setting.go
+++ b/modules/setting/setting.go
@@ -1151,6 +1151,7 @@ var Service struct {
EnableCaptcha bool
DefaultKeepEmailPrivate bool
DefaultAllowCreateOrganization bool
+ EnableTimetracking bool
DefaultEnableTimetracking bool
DefaultAllowOnlyContributorsToTrackTime bool
NoReplyAddress string
@@ -1174,7 +1175,10 @@ 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.EnableTimetracking = sec.Key("ENABLE_TIMETRACKING").MustBool(true)
+ if Service.EnableTimetracking {
+ 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")