···3030 // DEPRECATED should not be removed because users maybe upgrade from lower version to the latest version
3131 // if these are removed, the warning will not be shown
3232 deprecatedSetting(rootCfg, "repository", "DISABLE_MIRRORS", "mirror", "ENABLED", "v1.19.0")
3333- if rootCfg.Section("repository").Key("DISABLE_MIRRORS").MustBool(false) {
3333+ if ConfigSectionKeyBool(rootCfg.Section("repository"), "DISABLE_MIRRORS") {
3434 Mirror.DisableNewPull = true
3535 }
3636
···262262 RunUser = rootSec.Key("RUN_USER").MustString(user.CurrentUsername())
263263 // The following is a purposefully undocumented option. Please do not run Gitea as root. It will only cause future headaches.
264264 // Please don't use root as a bandaid to "fix" something that is broken, instead the broken thing should instead be fixed properly.
265265- unsafeAllowRunAsRoot := rootSec.Key("I_AM_BEING_UNSAFE_RUNNING_AS_ROOT").MustBool(false)
265265+ unsafeAllowRunAsRoot := ConfigSectionKeyBool(rootSec, "I_AM_BEING_UNSAFE_RUNNING_AS_ROOT")
266266 RunMode = os.Getenv("GITEA_RUN_MODE")
267267 if RunMode == "" {
268268 RunMode = rootSec.Key("RUN_MODE").MustString("prod")