aboutsummaryrefslogtreecommitdiffstats
path: root/routers/routes/routes.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2020-01-20 23:45:42 +0800
committerAntoine GIRARD <sapk@users.noreply.github.com>2020-01-20 16:45:42 +0100
commitc4e0f717e78e216c5ac6c48b065022b524f24047 (patch)
treefe7fd38591360b742574fdf41bee83d5b4f86557 /routers/routes/routes.go
parente3e024876e71d01a6700a7f6fe8861d709de6de6 (diff)
downloadgitea-c4e0f717e78e216c5ac6c48b065022b524f24047.tar.gz
gitea-c4e0f717e78e216c5ac6c48b065022b524f24047.zip
fix bug about wrong dependencies permissions check and other wr… (#9884)
* fix bug about wrong dependencies permissions check and other wrong permissions check * improve code
Diffstat (limited to 'routers/routes/routes.go')
-rw-r--r--routers/routes/routes.go8
1 files changed, 1 insertions, 7 deletions
diff --git a/routers/routes/routes.go b/routers/routes/routes.go
index d38de7014c..c02b73212f 100644
--- a/routers/routes/routes.go
+++ b/routers/routes/routes.go
@@ -532,18 +532,12 @@ func RegisterRoutes(m *macaron.Macaron) {
reqRepoReleaseReader := context.RequireRepoReader(models.UnitTypeReleases)
reqRepoWikiWriter := context.RequireRepoWriter(models.UnitTypeWiki)
reqRepoIssueReader := context.RequireRepoReader(models.UnitTypeIssues)
+ reqRepoIssueWriter := context.RequireRepoWriter(models.UnitTypeIssues)
reqRepoPullsWriter := context.RequireRepoWriter(models.UnitTypePullRequests)
reqRepoPullsReader := context.RequireRepoReader(models.UnitTypePullRequests)
reqRepoIssuesOrPullsWriter := context.RequireRepoWriterOr(models.UnitTypeIssues, models.UnitTypePullRequests)
reqRepoIssuesOrPullsReader := context.RequireRepoReaderOr(models.UnitTypeIssues, models.UnitTypePullRequests)
- reqRepoIssueWriter := func(ctx *context.Context) {
- if !ctx.Repo.CanWrite(models.UnitTypeIssues) {
- ctx.Error(403)
- return
- }
- }
-
// ***** START: Organization *****
m.Group("/org", func() {
m.Group("", func() {