summaryrefslogtreecommitdiffstats
path: root/routers
diff options
context:
space:
mode:
authorNorwin <noerw@users.noreply.github.com>2021-05-19 14:48:48 +0000
committerGitHub <noreply@github.com>2021-05-19 10:48:48 -0400
commite542b416a700eb27f14b97145bd5f76f43efe2eb (patch)
tree7c8fac7b867da1f046f6d684780a78d5eddc925e /routers
parent370cfde35e5b54902cf335581f15fa1d43529b43 (diff)
downloadgitea-e542b416a700eb27f14b97145bd5f76f43efe2eb.tar.gz
gitea-e542b416a700eb27f14b97145bd5f76f43efe2eb.zip
api: fix overly strict edit pr permissions (#15900)
Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
Diffstat (limited to 'routers')
-rw-r--r--routers/api/v1/api.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/api/v1/api.go b/routers/api/v1/api.go
index 0876f3273c..5656730608 100644
--- a/routers/api/v1/api.go
+++ b/routers/api/v1/api.go
@@ -888,7 +888,7 @@ func Routes() *web.Route {
Post(reqToken(), mustNotBeArchived, bind(api.CreatePullRequestOption{}), repo.CreatePullRequest)
m.Group("/{index}", func() {
m.Combo("").Get(repo.GetPullRequest).
- Patch(reqToken(), reqRepoWriter(models.UnitTypePullRequests), bind(api.EditPullRequestOption{}), repo.EditPullRequest)
+ Patch(reqToken(), bind(api.EditPullRequestOption{}), repo.EditPullRequest)
m.Get(".diff", repo.DownloadPullDiff)
m.Get(".patch", repo.DownloadPullPatch)
m.Post("/update", reqToken(), repo.UpdatePullRequest)