diff options
author | Bwko <bouwko@gmail.com> | 2018-04-09 17:15:32 +0200 |
---|---|---|
committer | Lunny Xiao <xiaolunwen@gmail.com> | 2018-04-09 23:15:32 +0800 |
commit | 8ee45eb614eaa4814936a2166addc8c1208ea1f5 (patch) | |
tree | aa63463560f676b1be03ac53f817b32e52d5e334 /modules/setting | |
parent | 30c81a126c36da555f3e982d36c38779d962edfd (diff) | |
download | gitea-8ee45eb614eaa4814936a2166addc8c1208ea1f5.tar.gz gitea-8ee45eb614eaa4814936a2166addc8c1208ea1f5.zip |
Add EnableTimetracking option to app settings (#3719)
Diffstat (limited to 'modules/setting')
-rw-r--r-- | modules/setting/setting.go | 6 |
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") |