Add the config option

This commit is contained in:
Minecon724 2025-09-13 11:56:59 +00:00
commit 3fed792929
Signed by: Minecon724
GPG key ID: A02E6E67AB961189
3 changed files with 10 additions and 0 deletions

View file

@ -2459,6 +2459,10 @@ LEVEL = Info
;ENABLE_SITEMAP = true
;; Enable/Disable RSS/Atom feed
;ENABLE_FEED = true
;; Terms of Service URL. If set, users will have to agree to the ToS during registration.
;TERMS_OF_SERVICE = /terms
;; Privacy Policy URL. If set, users will have to agree to the Privacy Policy during registration.
;PRIVACY_POLICY = /privacy
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

View file

@ -11,6 +11,8 @@ type OtherConfig struct {
ShowFooterPoweredBy bool
EnableFeed bool
EnableSitemap bool
TermsOfServiceUrl string
PrivacyPolicyUrl string
}
var Other = OtherConfig{
@ -19,6 +21,8 @@ var Other = OtherConfig{
ShowFooterPoweredBy: true,
EnableSitemap: true,
EnableFeed: true,
TermsOfServiceUrl: "",
PrivacyPolicyUrl: "",
}
func loadOtherFrom(rootCfg ConfigProvider) {

View file

@ -53,6 +53,8 @@ func CommonTemplateContextData() ContextData {
"ShowMilestonesDashboardPage": setting.Service.ShowMilestonesDashboardPage,
"ShowFooterVersion": setting.Other.ShowFooterVersion,
"DisableDownloadSourceArchives": setting.Repository.DisableDownloadSourceArchives,
"TermsOfServiceURL": setting.Other.TermsOfServiceUrl,
"PrivacyPolicyURL": setting.Other.PrivacyPolicyUrl,
"EnableSwagger": setting.API.EnableSwagger,
"EnableOpenIDSignIn": setting.Service.EnableOpenIDSignIn,