From 8ee45eb614eaa4814936a2166addc8c1208ea1f5 Mon Sep 17 00:00:00 2001 From: Bwko Date: Mon, 9 Apr 2018 17:15:32 +0200 Subject: Add EnableTimetracking option to app settings (#3719) --- modules/setting/setting.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'modules/setting') 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") -- cgit v1.2.3