瀏覽代碼

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

Signed-off-by: Andrew Thornton <art27@cantab.net>
tags/v1.13.0-rc2
zeripath 3 年之前
父節點
當前提交
f825e2a568
沒有連結到貢獻者的電子郵件帳戶。
共有 1 個檔案被更改,包括 5 行新增1 行删除
  1. 5
    1
      routers/api/v1/repo/issue_reaction.go

+ 5
- 1
routers/api/v1/repo/issue_reaction.go 查看文件

@@ -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…
取消
儲存