diff options
Diffstat (limited to 'routers/web/repo/issue_pin.go')
-rw-r--r-- | routers/web/repo/issue_pin.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/routers/web/repo/issue_pin.go b/routers/web/repo/issue_pin.go index bbfeaee6e8..6680de32a9 100644 --- a/routers/web/repo/issue_pin.go +++ b/routers/web/repo/issue_pin.go @@ -90,6 +90,12 @@ func IssuePinMove(ctx *context.Context) { return } + if issue.RepoID != ctx.Repo.Repository.ID { + ctx.Status(http.StatusNotFound) + log.Error("Issue does not belong to this repository") + return + } + err = issue.MovePin(ctx, form.Position) if err != nil { ctx.Status(http.StatusInternalServerError) |