mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Login: only enabled oauth options are shown on login page
This commit is contained in:
parent
a5e450a0dd
commit
aa261bbe23
2
grafana
2
grafana
@ -1 +1 @@
|
||||
Subproject commit 4572747bd60c688f7cc2cbf8a2303b9c95ad7b9d
|
||||
Subproject commit 017eab8dcd182b8c19f65657fc3d46e30545b7ff
|
@ -22,6 +22,10 @@ func LoginView(c *middleware.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
settings := c.Data["Settings"].(map[string]interface{})
|
||||
settings["googleAuthEnabled"] = setting.OAuthService.Google
|
||||
settings["githubAuthEnabled"] = setting.OAuthService.GitHub
|
||||
|
||||
// Check auto-login.
|
||||
uname := c.GetCookie(setting.CookieUserName)
|
||||
if len(uname) == 0 {
|
||||
|
Loading…
Reference in New Issue
Block a user