summaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2015-08-03 17:42:09 +0800
committerUnknwon <u@gogs.io>2015-08-03 17:42:09 +0800
commit04458d49a066c8befd79b59e62df00fbf49fa46b (patch)
tree0b076d7ec40d979769587d3ad13c5a326fbdb9a5 /cmd
parent8e8d535e233966acd1510df78c01e11dc8156514 (diff)
downloadgitea-04458d49a066c8befd79b59e62df00fbf49fa46b.tar.gz
gitea-04458d49a066c8befd79b59e62df00fbf49fa46b.zip
milestone: list view
Diffstat (limited to 'cmd')
-rw-r--r--cmd/web.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/cmd/web.go b/cmd/web.go
index dfad0a3580..c51ba3e890 100644
--- a/cmd/web.go
+++ b/cmd/web.go
@@ -330,7 +330,7 @@ func runWeb(ctx *cli.Context) {
m.Get("/template/*", dev.TemplatePreview)
}
- reqAdmin := middleware.RequireAdmin()
+ reqRepoAdmin := middleware.RequireRepoAdmin()
// Organization.
m.Group("/org", func() {
@@ -405,7 +405,7 @@ func runWeb(ctx *cli.Context) {
m.Post("/:name", repo.GitHooksEditPost)
}, middleware.GitHookService())
})
- }, reqSignIn, middleware.RepoAssignment(true), reqAdmin)
+ }, reqSignIn, middleware.RepoAssignment(true), reqRepoAdmin)
m.Group("/:username/:reponame", func() {
m.Get("/action/:action", repo.Action)
@@ -423,14 +423,14 @@ func runWeb(ctx *cli.Context) {
m.Post("/new", bindIgnErr(auth.CreateLabelForm{}), repo.NewLabel)
m.Post("/edit", bindIgnErr(auth.CreateLabelForm{}), repo.UpdateLabel)
m.Post("/delete", repo.DeleteLabel)
- })
+ }, reqRepoAdmin)
m.Group("/milestones", func() {
m.Get("/new", repo.NewMilestone)
m.Post("/new", bindIgnErr(auth.CreateMilestoneForm{}), repo.NewMilestonePost)
m.Get("/:index/edit", repo.UpdateMilestone)
m.Post("/:index/edit", bindIgnErr(auth.CreateMilestoneForm{}), repo.UpdateMilestonePost)
m.Get("/:index/:action", repo.UpdateMilestone)
- })
+ }, reqRepoAdmin)
m.Post("/comment/:action", repo.Comment)
@@ -439,7 +439,7 @@ func runWeb(ctx *cli.Context) {
m.Post("/new", bindIgnErr(auth.NewReleaseForm{}), repo.NewReleasePost)
m.Get("/edit/:tagname", repo.EditRelease)
m.Post("/edit/:tagname", bindIgnErr(auth.EditReleaseForm{}), repo.EditReleasePost)
- }, middleware.RepoRef())
+ }, reqRepoAdmin, middleware.RepoRef())
}, reqSignIn, middleware.RepoAssignment(true))
m.Group("/:username/:reponame", func() {