Browse Source

And there is another one ... (#13350)

Signed-off-by: Andrew Thornton <art27@cantab.net>
tags/v1.13.0-rc2
zeripath 3 years ago
parent
commit
f825e2a568
No account linked to committer's email address
1 changed files with 5 additions and 1 deletions
  1. 5
    1
      routers/api/v1/repo/issue_reaction.go

+ 5
- 1
routers/api/v1/repo/issue_reaction.go View File

@@ -56,7 +56,11 @@ func GetIssueCommentReactions(ctx *context.APIContext) {
return
}

if !ctx.Repo.CanRead(models.UnitTypeIssues) {
if err := comment.LoadIssue(); err != nil {
ctx.Error(http.StatusInternalServerError, "comment.LoadIssue", err)
}

if !ctx.Repo.CanReadIssuesOrPulls(comment.Issue.IsPull) {
ctx.Error(http.StatusForbidden, "GetIssueCommentReactions", errors.New("no permission to get reactions"))
return
}

Loading…
Cancel
Save