Browse Source

Allow empty assignees on pull request edit (#22150)

Fixes #22140
tags/v1.19.0-rc0
KN4CK3R 1 year ago
parent
commit
b76718249a
No account linked to committer's email address
1 changed files with 5 additions and 0 deletions
  1. 5
    0
      routers/api/v1/repo/pull.go

+ 5
- 0
routers/api/v1/repo/pull.go 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

Loading…
Cancel
Save