]> source.dussan.org Git - gitea.git/commitdiff
api: fix overly strict edit pr permissions (#15900)
authorNorwin <noerw@users.noreply.github.com>
Wed, 19 May 2021 14:48:48 +0000 (14:48 +0000)
committerGitHub <noreply@github.com>
Wed, 19 May 2021 14:48:48 +0000 (10:48 -0400)
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: zeripath <art27@cantab.net>
routers/api/v1/api.go

index 0876f3273cb50972b8d6fb1e9cfe733c9e83a023..5656730608151e1631053b5f69b5457b30510464 100644 (file)
@@ -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)