diff --git a/modules/setting/setting.go b/modules/setting/setting.go index cff3e7dbc..77232dd34 100644 --- a/modules/setting/setting.go +++ b/modules/setting/setting.go @@ -480,6 +480,16 @@ func NewContext() { }[Cfg.Section("time").Key("FORMAT").MustString("RFC1123")] RunUser = Cfg.Section("").Key("RUN_USER").String() + + switch mode := Cfg.Section("").Key("RUN_USER").String(); mode { + case "prod": + ProdMode = true + case "dev": + ProdMode = false + case "test": + ProdMode = false + } + // Does not check run user when the install lock is off. if InstallLock { currentUser, match := IsRunUserMatchCurrentUser(RunUser)