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:
co-authored by
Arve Knudsen
parent
370791d50b
commit
80e9546cec
+6
-1
@@ -360,9 +360,14 @@ func (hs *HTTPServer) setIndexViewData(c *models.ReqContext) (*dtos.IndexViewDat
|
||||
})
|
||||
}
|
||||
|
||||
helpVersion := fmt.Sprintf(`%s v%s (%s)`, setting.ApplicationName, setting.BuildVersion, setting.BuildCommit)
|
||||
if hs.Cfg.AnonymousHideVersion && !c.IsSignedIn {
|
||||
helpVersion = setting.ApplicationName
|
||||
}
|
||||
|
||||
data.NavTree = append(data.NavTree, &dtos.NavLink{
|
||||
Text: "Help",
|
||||
SubTitle: fmt.Sprintf(`%s v%s (%s)`, setting.ApplicationName, setting.BuildVersion, setting.BuildCommit),
|
||||
SubTitle: helpVersion,
|
||||
Id: "help",
|
||||
Url: "#",
|
||||
Icon: "question-circle",
|
||||
|
||||
Reference in New Issue
Block a user