|
|
@ -1067,26 +1067,28 @@ func viewSettings(app *App, u *User, w http.ResponseWriter, r *http.Request) err |
|
|
|
|
|
|
|
|
|
|
|
obj := struct { |
|
|
|
obj := struct { |
|
|
|
*UserPage |
|
|
|
*UserPage |
|
|
|
Email string |
|
|
|
Email string |
|
|
|
HasPass bool |
|
|
|
HasPass bool |
|
|
|
IsLogOut bool |
|
|
|
IsLogOut bool |
|
|
|
Silenced bool |
|
|
|
Silenced bool |
|
|
|
OauthSection bool |
|
|
|
OauthSection bool |
|
|
|
OauthAccounts []oauthAccountInfo |
|
|
|
OauthAccounts []oauthAccountInfo |
|
|
|
OauthSlack bool |
|
|
|
OauthSlack bool |
|
|
|
OauthWriteAs bool |
|
|
|
OauthWriteAs bool |
|
|
|
OauthGitLab bool |
|
|
|
OauthGitLab bool |
|
|
|
|
|
|
|
GitLabDisplayName 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), |
|
|
|
HasPass: passIsSet, |
|
|
|
HasPass: passIsSet, |
|
|
|
IsLogOut: r.FormValue("logout") == "1", |
|
|
|
IsLogOut: r.FormValue("logout") == "1", |
|
|
|
Silenced: fullUser.IsSilenced(), |
|
|
|
Silenced: fullUser.IsSilenced(), |
|
|
|
OauthSection: displayOauthSection, |
|
|
|
OauthSection: displayOauthSection, |
|
|
|
OauthAccounts: oauthAccounts, |
|
|
|
OauthAccounts: oauthAccounts, |
|
|
|
OauthSlack: enableOauthSlack, |
|
|
|
OauthSlack: enableOauthSlack, |
|
|
|
OauthWriteAs: enableOauthWriteAs, |
|
|
|
OauthWriteAs: enableOauthWriteAs, |
|
|
|
OauthGitLab: enableOauthGitLab, |
|
|
|
OauthGitLab: enableOauthGitLab, |
|
|
|
|
|
|
|
GitLabDisplayName: config.OrDefaultString(app.Config().GitlabOauth.DisplayName, gitlabDisplayName), |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
showUserPage(w, "settings", obj) |
|
|
|
showUserPage(w, "settings", obj) |
|
|
|