Browse Source

Fixed ProdMode variable not being changed by settings

pull/3696/head
Flare 8 years ago
parent
commit
fafa035b53
No known key found for this signature in database
GPG Key ID: 762EE3D369C1A772
  1. 10
      modules/setting/setting.go

10
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)

Loading…
Cancel
Save