|
|
@ -480,6 +480,16 @@ func NewContext() { |
|
|
|
}[Cfg.Section("time").Key("FORMAT").MustString("RFC1123")] |
|
|
|
}[Cfg.Section("time").Key("FORMAT").MustString("RFC1123")] |
|
|
|
|
|
|
|
|
|
|
|
RunUser = Cfg.Section("").Key("RUN_USER").String() |
|
|
|
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.
|
|
|
|
// Does not check run user when the install lock is off.
|
|
|
|
if InstallLock { |
|
|
|
if InstallLock { |
|
|
|
currentUser, match := IsRunUserMatchCurrentUser(RunUser) |
|
|
|
currentUser, match := IsRunUserMatchCurrentUser(RunUser) |
|
|
|