Settings: Add setting for hiding version number for anonymous users (#24919)

* Settings: Add setting for hiding version number for anonymous users

Fixes #12925

* Hide version string from footer when unavailable

* Settings: Test frontend settings with hide version for anonymous users

* Settings: Add hide version variable to frontend settings

* Make AnonymousHideVersion non-global

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Settings: Improve test neighbor friendliness, reset state before and after

* Settings: Use T.Cleanup

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
This commit is contained in:
Emil Tullstedt
2020-06-17 07:39:50 +02:00
committed by GitHub
co-authored by Arve Knudsen
parent 370791d50b
commit 80e9546cec
10 changed files with 170 additions and 13 deletions
+3
View File
@@ -296,6 +296,8 @@ type Cfg struct {
// Use to enable new features which may still be in alpha/beta stage.
FeatureToggles map[string]bool
AnonymousHideVersion bool
}
// IsExpressionsEnabled returns whether the expressions feature is enabled.
@@ -873,6 +875,7 @@ func (cfg *Cfg) Load(args *CommandLineArgs) error {
if err != nil {
return err
}
cfg.AnonymousHideVersion = iniFile.Section("auth.anonymous").Key("hide_version").MustBool(false)
// auth proxy
authProxy := iniFile.Section("auth.proxy")