Merge remote-tracking branch 'upstream/main' into limit-repo-size

Conflicts:
	models/migrations/migrations.go
	models/migrations/v1_19/v237.go

	new file:   models/migrations/v1_19/v238.go
This commit is contained in:
DmitryFrolovTri committed 2022-12-25 09:40:26 +00:00
commit 2763393f39
98 files changed
+619 -362

No files matched your search

+5
View File
@@ -490,6 +490,11 @@ func EditPullRequest(ctx *context.APIContext) {
issue := pr.Issue
issue.Repo = ctx.Repo.Repository
if err := issue.LoadAttributes(ctx); err != nil {
ctx.Error(http.StatusInternalServerError, "LoadAttributes", err)
return
}
if !issue.IsPoster(ctx.Doer.ID) && !ctx.Repo.CanWrite(unit.TypePullRequests) {
ctx.Status(http.StatusForbidden)
return