aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author65432021-06-06 12:22:05 +0200
committerGitHub2021-06-06 12:22:05 +0200
commit1e76f7b5b7f51cf32fbdb85fe9ee2cc00595bc3a (patch)
treebc9eaac045d906b1aaae9717c0f6236a75c10b2c
parent2265058c31c9cbeaa623e3d0687d4e01165bc2bd (diff)
api: fix overly strict edit pr permissions (#15900) (#16081)
Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: Norwin <noerw@users.noreply.github.com> Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
-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 9fed22113..2492c3b49 100644
--- a/routers/api/v1/api.go
+++ b/routers/api/v1/api.go
@@ -893,7 +893,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)