Backport 62658 to v9.4.x (#64545)

* Navigation: Fix Home logo always going to `/login` (#62658)

* only redirect to /login when anonymous access is disabled

* only search for dashboards when not logged in if anon access is enabled

* fix go logic

* add unit tests

(cherry picked from commit 3336327306)

* remove file i accidentally left in :/

* import correct method
This commit is contained in:
Ashley Harrison
2023-03-10 04:59:06 -05:00
committed by GitHub
parent cf3f234a54
commit aa09499343
8 changed files with 199 additions and 8 deletions
+1
View File
@@ -175,6 +175,7 @@ func (hs *HTTPServer) getFrontendSettingsMap(c *contextmodel.ReqContext) (map[st
"enabledFeatures": hs.License.EnabledFeatures(),
},
"featureToggles": hs.Features.GetEnabled(c.Req.Context()),
"anonymousEnabled": hs.Cfg.AnonymousEnabled,
"rendererAvailable": hs.RenderService.IsAvailable(c.Req.Context()),
"rendererVersion": hs.RenderService.Version(),
"secretsManagerPluginEnabled": secretsManagerPluginEnabled,