Browse Source

[API] Load issue attributes when editing an issue (#6723)

tags/v1.21.12.1
John Olheiser techknowlogick 7 years ago
parent
commit
45fa5cc1be
1 changed files with 6 additions and 0 deletions
  1. +6
    -0
      routers/api/v1/repo/issue.go

+ 6
- 0
routers/api/v1/repo/issue.go View File

@@ -291,6 +291,12 @@ func EditIssue(ctx *context.APIContext, form api.EditIssueOption) {
}
issue.Repo = ctx.Repo.Repository

err = issue.LoadAttributes()
if err != nil {
ctx.Error(500, "LoadAttributes", err)
return
}

if !issue.IsPoster(ctx.User.ID) && !ctx.Repo.CanWrite(models.UnitTypeIssues) {
ctx.Status(403)
return


Loading…
Cancel
Save