summaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2015-12-04 21:30:33 -0500
committerUnknwon <u@gogs.io>2015-12-04 21:30:33 -0500
commite538ff27704cddb1a99efc1a6be19e134f97355f (patch)
tree88f93b17d47aeb3ac4dd0692f5c5b613ee38b28b /cmd
parent76d4b9288b60ed6c037257415a570225764ff0a0 (diff)
downloadgitea-e538ff27704cddb1a99efc1a6be19e134f97355f.tar.gz
gitea-e538ff27704cddb1a99efc1a6be19e134f97355f.zip
fix #1829 and fix #890
Diffstat (limited to 'cmd')
-rw-r--r--cmd/web.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/cmd/web.go b/cmd/web.go
index 5f1e44f3a1..29f6a0f8b7 100644
--- a/cmd/web.go
+++ b/cmd/web.go
@@ -421,7 +421,7 @@ func runWeb(ctx *cli.Context) {
m.Get("/action/:action", repo.Action)
m.Group("/issues", func() {
- m.Combo("/new").Get(middleware.RepoRef(), repo.NewIssue).
+ m.Combo("/new", repo.MustEnableIssues).Get(middleware.RepoRef(), repo.NewIssue).
Post(bindIgnErr(auth.CreateIssueForm{}), repo.NewIssuePost)
m.Combo("/:index/comments").Post(bindIgnErr(auth.CreateCommentForm{}), repo.NewComment)
@@ -459,7 +459,7 @@ func runWeb(ctx *cli.Context) {
m.Post("/delete", repo.DeleteRelease)
}, reqRepoAdmin, middleware.RepoRef())
- m.Combo("/compare/*").Get(repo.CompareAndPullRequest).
+ m.Combo("/compare/*", repo.MustEnablePulls).Get(repo.CompareAndPullRequest).
Post(bindIgnErr(auth.CreateIssueForm{}), repo.CompareAndPullRequestPost)
}, reqSignIn, middleware.RepoAssignment())
@@ -484,7 +484,7 @@ func runWeb(ctx *cli.Context) {
m.Combo("/:page/_edit").Get(repo.EditWiki).
Post(bindIgnErr(auth.NewWikiForm{}), repo.EditWikiPost)
}, reqSignIn, reqRepoPusher)
- }, middleware.RepoRef())
+ }, repo.MustEnableWiki, middleware.RepoRef())
m.Get("/archive/*", repo.Download)
@@ -492,7 +492,7 @@ func runWeb(ctx *cli.Context) {
m.Get("/commits", repo.ViewPullCommits)
m.Get("/files", repo.ViewPullFiles)
m.Post("/merge", reqRepoAdmin, repo.MergePullRequest)
- })
+ }, repo.MustEnablePulls)
m.Group("", func() {
m.Get("/src/*", repo.Home)