mirror of
https://codeberg.org/davrot/forgejo.git
synced 2025-04-23 00:06:43 +02:00
Dateien nach „modules/setting“ hochladen
This commit is contained in:
parent
12f92e2155
commit
ba874d965a
1 changed files with 3 additions and 10 deletions
|
@ -85,8 +85,7 @@ var Service = struct {
|
|||
DefaultOrgMemberVisible bool
|
||||
UserDeleteWithCommentsMaxTime time.Duration
|
||||
ValidSiteURLSchemes []string
|
||||
UsernameCooldownPeriod int64
|
||||
MaxUserRedirects int64
|
||||
LandingPageInfoEnabled bool
|
||||
|
||||
// OpenID settings
|
||||
EnableOpenIDSignIn bool
|
||||
|
@ -207,6 +206,8 @@ func loadServiceFrom(rootCfg ConfigProvider) {
|
|||
Service.DefaultUserIsRestricted = sec.Key("DEFAULT_USER_IS_RESTRICTED").MustBool(false)
|
||||
Service.AllowDotsInUsernames = sec.Key("ALLOW_DOTS_IN_USERNAMES").MustBool(true)
|
||||
Service.EnableTimetracking = sec.Key("ENABLE_TIMETRACKING").MustBool(true)
|
||||
Service.LandingPageInfoEnabled = sec.Key("ENABLE_LANDING_PAGE_INFO").MustBool(true)
|
||||
|
||||
if Service.EnableTimetracking {
|
||||
Service.DefaultEnableTimetracking = sec.Key("DEFAULT_ENABLE_TIMETRACKING").MustBool(true)
|
||||
}
|
||||
|
@ -259,14 +260,6 @@ func loadServiceFrom(rootCfg ConfigProvider) {
|
|||
}
|
||||
}
|
||||
Service.ValidSiteURLSchemes = schemes
|
||||
Service.UsernameCooldownPeriod = sec.Key("USERNAME_COOLDOWN_PERIOD").MustInt64(0)
|
||||
|
||||
// Only set a default if USERNAME_COOLDOWN_PERIOD's feature is active.
|
||||
maxUserRedirectsDefault := int64(0)
|
||||
if Service.UsernameCooldownPeriod > 0 {
|
||||
maxUserRedirectsDefault = 5
|
||||
}
|
||||
Service.MaxUserRedirects = sec.Key("MAX_USER_REDIRECTS").MustInt64(maxUserRedirectsDefault)
|
||||
|
||||
mustMapSetting(rootCfg, "service.explore", &Service.Explore)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue