Include key names in Login page struct

This commit is contained in:
Matt Baer 2020-08-19 12:02:36 -04:00
parent 95273697f4
commit ab32caa49c

View file

@ -317,19 +317,19 @@ func viewLogin(app *App, w http.ResponseWriter, r *http.Request) error {
OauthGitea bool OauthGitea bool
GiteaDisplayName string GiteaDisplayName string
}{ }{
pageForReq(app, r), StaticPage: pageForReq(app, r),
r.FormValue("to"), To: r.FormValue("to"),
template.HTML(""), Message: template.HTML(""),
[]template.HTML{}, Flashes: []template.HTML{},
getTempInfo(app, "login-user", r, w), LoginUsername: getTempInfo(app, "login-user", r, w),
app.Config().SlackOauth.ClientID != "", OauthSlack: app.Config().SlackOauth.ClientID != "",
app.Config().WriteAsOauth.ClientID != "", OauthWriteAs: app.Config().WriteAsOauth.ClientID != "",
app.Config().GitlabOauth.ClientID != "", OauthGitlab: app.Config().GitlabOauth.ClientID != "",
config.OrDefaultString(app.Config().GenericOauth.DisplayName, genericOauthDisplayName), GitlabDisplayName: config.OrDefaultString(app.Config().GenericOauth.DisplayName, genericOauthDisplayName),
app.Config().GenericOauth.ClientID != "", OauthGeneric: app.Config().GenericOauth.ClientID != "",
config.OrDefaultString(app.Config().GitlabOauth.DisplayName, gitlabDisplayName), OauthGenericDisplayName: config.OrDefaultString(app.Config().GitlabOauth.DisplayName, gitlabDisplayName),
app.Config().GiteaOauth.ClientID != "", OauthGitea: app.Config().GiteaOauth.ClientID != "",
config.OrDefaultString(app.Config().GiteaOauth.DisplayName, giteaDisplayName), GiteaDisplayName: config.OrDefaultString(app.Config().GiteaOauth.DisplayName, giteaDisplayName),
} }
if earlyError != "" { if earlyError != "" {