|
|
@ -325,8 +325,8 @@ func viewLogin(app *App, w http.ResponseWriter, r *http.Request) error { |
|
|
|
app.Config().SlackOauth.ClientID != "", |
|
|
|
app.Config().SlackOauth.ClientID != "", |
|
|
|
app.Config().WriteAsOauth.ClientID != "", |
|
|
|
app.Config().WriteAsOauth.ClientID != "", |
|
|
|
app.Config().GitlabOauth.ClientID != "", |
|
|
|
app.Config().GitlabOauth.ClientID != "", |
|
|
|
app.Config().GenericOauth.ClientID != "", |
|
|
|
|
|
|
|
config.OrDefaultString(app.Config().GenericOauth.DisplayName, genericOauthDisplayName), |
|
|
|
config.OrDefaultString(app.Config().GenericOauth.DisplayName, genericOauthDisplayName), |
|
|
|
|
|
|
|
app.Config().GenericOauth.ClientID != "", |
|
|
|
config.OrDefaultString(app.Config().GitlabOauth.DisplayName, gitlabDisplayName), |
|
|
|
config.OrDefaultString(app.Config().GitlabOauth.DisplayName, gitlabDisplayName), |
|
|
|
app.Config().GiteaOauth.ClientID != "", |
|
|
|
app.Config().GiteaOauth.ClientID != "", |
|
|
|
config.OrDefaultString(app.Config().GiteaOauth.DisplayName, giteaDisplayName), |
|
|
|
config.OrDefaultString(app.Config().GiteaOauth.DisplayName, giteaDisplayName), |
|
|
@ -1088,7 +1088,7 @@ func viewSettings(app *App, u *User, w http.ResponseWriter, r *http.Request) err |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
displayOauthSection := enableOauthSlack || enableOauthWriteAs || enableOauthGitLab || enableOauthGeneric || enableOauthGitea || len(oauthAccounts) > 0 |
|
|
|
displayOauthSection := enableOauthSlack || enableOauthWriteAs || enableOauthGitLab || enableOauthGeneric || enableOauthGitea || len(oauthAccounts) > 0 |
|
|
|
|
|
|
|
|
|
|
|
obj := struct { |
|
|
|
obj := struct { |
|
|
|
*UserPage |
|
|
|
*UserPage |
|
|
@ -1104,8 +1104,8 @@ func viewSettings(app *App, u *User, w http.ResponseWriter, r *http.Request) err |
|
|
|
GitLabDisplayName string |
|
|
|
GitLabDisplayName string |
|
|
|
OauthGeneric bool |
|
|
|
OauthGeneric bool |
|
|
|
OauthGenericDisplayName string |
|
|
|
OauthGenericDisplayName string |
|
|
|
OauthGitea bool |
|
|
|
OauthGitea bool |
|
|
|
GiteaDisplayName string |
|
|
|
GiteaDisplayName string |
|
|
|
}{ |
|
|
|
}{ |
|
|
|
UserPage: NewUserPage(app, r, u, "Account Settings", flashes), |
|
|
|
UserPage: NewUserPage(app, r, u, "Account Settings", flashes), |
|
|
|
Email: fullUser.EmailClear(app.keys), |
|
|
|
Email: fullUser.EmailClear(app.keys), |
|
|
@ -1120,8 +1120,8 @@ func viewSettings(app *App, u *User, w http.ResponseWriter, r *http.Request) err |
|
|
|
GitLabDisplayName: config.OrDefaultString(app.Config().GitlabOauth.DisplayName, gitlabDisplayName), |
|
|
|
GitLabDisplayName: config.OrDefaultString(app.Config().GitlabOauth.DisplayName, gitlabDisplayName), |
|
|
|
OauthGeneric: enableOauthGeneric, |
|
|
|
OauthGeneric: enableOauthGeneric, |
|
|
|
OauthGenericDisplayName: config.OrDefaultString(app.Config().GenericOauth.DisplayName, genericOauthDisplayName), |
|
|
|
OauthGenericDisplayName: config.OrDefaultString(app.Config().GenericOauth.DisplayName, genericOauthDisplayName), |
|
|
|
OauthGitea: enableOauthGitea, |
|
|
|
OauthGitea: enableOauthGitea, |
|
|
|
GiteaDisplayName: config.OrDefaultString(app.Config().GiteaOauth.DisplayName, giteaDisplayName), |
|
|
|
GiteaDisplayName: config.OrDefaultString(app.Config().GiteaOauth.DisplayName, giteaDisplayName), |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
showUserPage(w, "settings", obj) |
|
|
|
showUserPage(w, "settings", obj) |
|
|
|