Auth: Hide forgot password if grafana auth is disabled (#79895)

* hide forgot password if grafana auth is disabled

* fix test
This commit is contained in:
Jo
2024-01-04 10:46:55 +01:00
committed by GitHub
parent e924627659
commit 5ae3249c36
6 changed files with 19 additions and 9 deletions
+2
View File
@@ -29,6 +29,8 @@ type FrontendSettingsAuthDTO struct {
GitLabSkipOrgRoleSync bool `json:"GitLabSkipOrgRoleSync"`
// Deprecated: this is no longer used and will be removed in Grafana 11
OktaSkipOrgRoleSync bool `json:"OktaSkipOrgRoleSync"`
DisableLogin bool `json:"disableLogin"`
}
type FrontendSettingsBuildInfoDTO struct {
+1
View File
@@ -329,6 +329,7 @@ func (hs *HTTPServer) getFrontendSettings(c *contextmodel.ReqContext) (*dtos.Fro
GithubSkipOrgRoleSync: parseSkipOrgRoleSyncEnabled(oauthProviders[social.GitHubProviderName]),
GitLabSkipOrgRoleSync: parseSkipOrgRoleSyncEnabled(oauthProviders[social.GitlabProviderName]),
OktaSkipOrgRoleSync: parseSkipOrgRoleSyncEnabled(oauthProviders[social.OktaProviderName]),
DisableLogin: hs.Cfg.DisableLogin,
}
if hs.pluginsCDNService != nil && hs.pluginsCDNService.IsEnabled() {