summaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2015-12-11 19:24:57 -0500
committerUnknwon <u@gogs.io>2015-12-11 19:24:57 -0500
commit59c965a5ec2553b40a76cc322855b62116eac5f0 (patch)
tree3f3f25f7eed2ed51a251343e5521416c1a13d635 /cmd
parent76bdbcc969acd0e91cd3e10f5fdbfae3273df45b (diff)
downloadgitea-59c965a5ec2553b40a76cc322855b62116eac5f0.tar.gz
gitea-59c965a5ec2553b40a76cc322855b62116eac5f0.zip
#2156 admin able to edit organization max repo creation
Diffstat (limited to 'cmd')
-rw-r--r--cmd/web.go9
1 files changed, 3 insertions, 6 deletions
diff --git a/cmd/web.go b/cmd/web.go
index ec8ccd5191..13d7660c76 100644
--- a/cmd/web.go
+++ b/cmd/web.go
@@ -258,10 +258,8 @@ func runWeb(ctx *cli.Context) {
m.Group("/users", func() {
m.Get("", admin.Users)
- m.Get("/new", admin.NewUser)
- m.Post("/new", bindIgnErr(auth.AdminCrateUserForm{}), admin.NewUserPost)
- m.Get("/:userid", admin.EditUser)
- m.Post("/:userid", bindIgnErr(auth.AdminEditUserForm{}), admin.EditUserPost)
+ m.Combo("/new").Get(admin.NewUser).Post(bindIgnErr(auth.AdminCrateUserForm{}), admin.NewUserPost)
+ m.Combo("/:userid").Get(admin.EditUser).Post(bindIgnErr(auth.AdminEditUserForm{}), admin.EditUserPost)
m.Post("/:userid/delete", admin.DeleteUser)
})
@@ -276,8 +274,7 @@ func runWeb(ctx *cli.Context) {
m.Group("/auths", func() {
m.Get("", admin.Authentications)
- m.Get("/new", admin.NewAuthSource)
- m.Post("/new", bindIgnErr(auth.AuthenticationForm{}), admin.NewAuthSourcePost)
+ m.Combo("/new").Get(admin.NewAuthSource).Post(bindIgnErr(auth.AuthenticationForm{}), admin.NewAuthSourcePost)
m.Combo("/:authid").Get(admin.EditAuthSource).
Post(bindIgnErr(auth.AuthenticationForm{}), admin.EditAuthSourcePost)
m.Post("/:authid/delete", admin.DeleteAuthSource)