Skip to content

Commit 1e76f7b

Browse files
6543noerwzeripathlunny
authored
api: fix overly strict edit pr permissions (#15900) (#16081)
Co-authored-by: 6543 <[email protected]> Co-authored-by: Norwin <[email protected]> Co-authored-by: zeripath <[email protected]> Co-authored-by: Lunny Xiao <[email protected]>
1 parent 2265058 commit 1e76f7b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

routers/api/v1/api.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -893,7 +893,7 @@ func Routes() *web.Route {
893893
Post(reqToken(), mustNotBeArchived, bind(api.CreatePullRequestOption{}), repo.CreatePullRequest)
894894
m.Group("/{index}", func() {
895895
m.Combo("").Get(repo.GetPullRequest).
896-
Patch(reqToken(), reqRepoWriter(models.UnitTypePullRequests), bind(api.EditPullRequestOption{}), repo.EditPullRequest)
896+
Patch(reqToken(), bind(api.EditPullRequestOption{}), repo.EditPullRequest)
897897
m.Get(".diff", repo.DownloadPullDiff)
898898
m.Get(".patch", repo.DownloadPullPatch)
899899
m.Post("/update", reqToken(), repo.UpdatePullRequest)

0 commit comments

Comments
 (0)