summaryrefslogtreecommitdiffstats
path: root/routers/web/repo/pull_review.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/web/repo/pull_review.go')
-rw-r--r--routers/web/repo/pull_review.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/routers/web/repo/pull_review.go b/routers/web/repo/pull_review.go
index ead7592fd0..afa3b17d31 100644
--- a/routers/web/repo/pull_review.go
+++ b/routers/web/repo/pull_review.go
@@ -263,6 +263,10 @@ func DismissReview(ctx *context.Context) {
form := web.GetForm(ctx).(*forms.DismissReviewForm)
comm, err := pull_service.DismissReview(ctx, form.ReviewID, ctx.Repo.Repository.ID, form.Message, ctx.Doer, true, true)
if err != nil {
+ if pull_service.IsErrDismissRequestOnClosedPR(err) {
+ ctx.Status(http.StatusForbidden)
+ return
+ }
ctx.ServerError("pull_service.DismissReview", err)
return
}