From e542b416a700eb27f14b97145bd5f76f43efe2eb Mon Sep 17 00:00:00 2001 From: Norwin Date: Wed, 19 May 2021 14:48:48 +0000 Subject: [PATCH] api: fix overly strict edit pr permissions (#15900) Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath --- routers/api/v1/api.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/routers/api/v1/api.go b/routers/api/v1/api.go index 0876f3273..565673060 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)