mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Login: fix login page failing when navigating from reset password views (#19124)
This commit is contained in:
@@ -179,6 +179,9 @@ func (hs *HTTPServer) getFrontendSettingsMap(c *m.ReqContext) (map[string]interf
|
||||
"exploreEnabled": setting.ExploreEnabled,
|
||||
"googleAnalyticsId": setting.GoogleAnalyticsId,
|
||||
"disableLoginForm": setting.DisableLoginForm,
|
||||
"disableUserSignUp": !setting.AllowUserSignUp,
|
||||
"loginHint": setting.LoginHint,
|
||||
"passwordHint": setting.PasswordHint,
|
||||
"externalUserMngInfo": setting.ExternalUserMngInfo,
|
||||
"externalUserMngLinkUrl": setting.ExternalUserMngLinkUrl,
|
||||
"externalUserMngLinkName": setting.ExternalUserMngLinkName,
|
||||
|
||||
@@ -40,10 +40,6 @@ func (hs *HTTPServer) LoginView(c *models.ReqContext) {
|
||||
}
|
||||
|
||||
viewData.Settings["oauth"] = enabledOAuths
|
||||
viewData.Settings["disableUserSignUp"] = !setting.AllowUserSignUp
|
||||
viewData.Settings["loginHint"] = setting.LoginHint
|
||||
viewData.Settings["passwordHint"] = setting.PasswordHint
|
||||
viewData.Settings["disableLoginForm"] = setting.DisableLoginForm
|
||||
viewData.Settings["samlEnabled"] = setting.IsEnterprise && hs.Cfg.SAMLEnabled
|
||||
|
||||
if loginError, ok := tryGetEncryptedCookie(c, LoginErrorCookieName); ok {
|
||||
|
||||
@@ -9,7 +9,9 @@ import { getBackendSrv } from '@grafana/runtime';
|
||||
import { hot } from 'react-hot-loader';
|
||||
import appEvents from 'app/core/app_events';
|
||||
|
||||
const isOauthEnabled = () => Object.keys(config.oauth).length > 0;
|
||||
const isOauthEnabled = () => {
|
||||
return !!config.oauth && Object.keys(config.oauth).length > 0;
|
||||
};
|
||||
|
||||
export interface FormModel {
|
||||
user: string;
|
||||
|
||||
Reference in New Issue
Block a user