Commit aa261bbe by Torkel Ödegaard

Login: only enabled oauth options are shown on login page

parent a5e450a0
Subproject commit 4572747bd60c688f7cc2cbf8a2303b9c95ad7b9d Subproject commit 017eab8dcd182b8c19f65657fc3d46e30545b7ff
...@@ -22,6 +22,10 @@ func LoginView(c *middleware.Context) { ...@@ -22,6 +22,10 @@ func LoginView(c *middleware.Context) {
return return
} }
settings := c.Data["Settings"].(map[string]interface{})
settings["googleAuthEnabled"] = setting.OAuthService.Google
settings["githubAuthEnabled"] = setting.OAuthService.GitHub
// Check auto-login. // Check auto-login.
uname := c.GetCookie(setting.CookieUserName) uname := c.GetCookie(setting.CookieUserName)
if len(uname) == 0 { if len(uname) == 0 {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment