summaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2015-08-19 02:49:44 +0800
committerUnknwon <u@gogs.io>2015-08-19 02:49:44 +0800
commit249345458737e4db5a06250593787b483726dff0 (patch)
treecf0c0b2a26341cbddfce59219d3cf447622563e3 /cmd
parent81b8427438d4d37d38a46d0fec4c22aee60f91fa (diff)
downloadgitea-249345458737e4db5a06250593787b483726dff0.tar.gz
gitea-249345458737e4db5a06250593787b483726dff0.zip
new delete account UI and password confirmation
Diffstat (limited to 'cmd')
-rw-r--r--cmd/web.go10
1 files changed, 8 insertions, 2 deletions
diff --git a/cmd/web.go b/cmd/web.go
index c441e91966..24b5a42a85 100644
--- a/cmd/web.go
+++ b/cmd/web.go
@@ -249,7 +249,7 @@ func runWeb(ctx *cli.Context) {
})
}, ignSignIn)
- // User.
+ // ***** START: User *****
m.Group("/user", func() {
m.Get("/login", user.SignIn)
m.Post("/login", bindIgnErr(auth.SignInForm{}), user.SignInPost)
@@ -259,6 +259,7 @@ func runWeb(ctx *cli.Context) {
m.Get("/reset_password", user.ResetPasswd)
m.Post("/reset_password", user.ResetPasswdPost)
}, reqSignOut)
+
m.Group("/user/settings", func() {
m.Get("", user.Settings)
m.Post("", bindIgnErr(auth.UpdateProfileForm{}), user.SettingsPost)
@@ -272,7 +273,11 @@ func runWeb(ctx *cli.Context) {
m.Get("/social", user.SettingsSocial)
m.Combo("/applications").Get(user.SettingsApplications).Post(bindIgnErr(auth.NewAccessTokenForm{}), user.SettingsApplicationsPost)
m.Route("/delete", "GET,POST", user.SettingsDelete)
- }, reqSignIn)
+ }, reqSignIn, func(ctx *middleware.Context) {
+ ctx.Data["PageIsUserSettings"] = true
+ ctx.Data["HasOAuthService"] = setting.OauthService != nil
+ })
+
m.Group("/user", func() {
// r.Get("/feeds", binding.Bind(auth.FeedsForm{}), user.Feeds)
m.Any("/activate", user.Activate)
@@ -282,6 +287,7 @@ func runWeb(ctx *cli.Context) {
m.Post("/forget_password", user.ForgotPasswdPost)
m.Get("/logout", user.SignOut)
})
+ // ***** END: User *****
// Gravatar service.
avt := avatar.CacheServer("public/img/avatar/", "public/img/avatar_default.jpg")