1
1
Fork 1
mirror of https://github.com/go-gitea/gitea.git synced 2024-05-26 11:26:10 +02:00

Allow empty assignees on pull request edit (#22150)

Fixes #22140
This commit is contained in:
KN4CK3R 2022-12-21 23:45:44 +01:00 committed by GitHub
parent 48d71b7d6b
commit b76718249a
Signed by: GitHub
GPG Key ID: 4AEE18F83AFDEB23

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