Template
1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo synced 2024-11-27 20:26:09 +01:00

Revert "fix PATCH /api/v1/repos/{owner}/{repo}/issues/comments/{id}"

This reverts commit e291ea5e33.
This commit is contained in:
Loïc Dachary 2023-11-26 06:33:48 +01:00
parent 8aed1fa594
commit 4ece6a4b19
No known key found for this signature in database
GPG key ID: 992D23B392F9E4F2

View file

@ -580,17 +580,7 @@ func editIssueComment(ctx *context.APIContext, form api.EditIssueCommentOption)
return
}
if err := comment.LoadIssue(ctx); err != nil {
ctx.Error(http.StatusInternalServerError, "LoadIssue", err)
return
}
if comment.Issue.RepoID != ctx.Repo.Repository.ID {
ctx.Status(http.StatusNotFound)
return
}
if !ctx.IsSigned || (ctx.Doer.ID != comment.PosterID && !ctx.Repo.CanWriteIssuesOrPulls(comment.Issue.IsPull)) {
if !ctx.IsSigned || (ctx.Doer.ID != comment.PosterID && !ctx.Repo.IsAdmin()) {
ctx.Status(http.StatusForbidden)
return
}