aboutsummaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2017-01-27 22:36:45 -0500
committerUnknwon <u@gogs.io>2017-01-27 22:36:45 -0500
commit7aa53635fe9a88fbd2d2e21bffc3888e2b4baa85 (patch)
tree959347f460bbc97971f1df9deec5e912dd627da0 /cmd
parent2ee0c61e62a47a620bf0e8f55c896616062008c1 (diff)
Add 'Organizations' page to user settings (#3587)
User is now able to view full list of organizations belongs to.
Diffstat (limited to 'cmd')
-rw-r--r--cmd/web.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/cmd/web.go b/cmd/web.go
index 2cbbb7c5..60fb8ef3 100644
--- a/cmd/web.go
+++ b/cmd/web.go
@@ -247,7 +247,12 @@ func runWeb(ctx *cli.Context) error {
m.Combo("/applications").Get(user.SettingsApplications).
Post(bindIgnErr(auth.NewAccessTokenForm{}), user.SettingsApplicationsPost)
m.Post("/applications/delete", user.SettingsDeleteApplication)
- m.Get("/organizations", user.SettingsOrganizations)
+
+ m.Group("/organizations", func() {
+ m.Get("", user.SettingsOrganizations)
+ m.Post("/leave", user.SettingsLeaveOrganization)
+ })
+
m.Route("/delete", "GET,POST", user.SettingsDelete)
}, reqSignIn, func(ctx *context.Context) {
ctx.Data["PageIsUserSettings"] = true