Login: only enabled oauth options are shown on login page

This commit is contained in:
Torkel Ödegaard 2015-01-28 10:26:13 +01:00
parent a5e450a0dd
commit aa261bbe23
2 changed files with 5 additions and 1 deletions

@ -1 +1 @@
Subproject commit 4572747bd60c688f7cc2cbf8a2303b9c95ad7b9d
Subproject commit 017eab8dcd182b8c19f65657fc3d46e30545b7ff

View File

@ -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 {