Skip to content

Commit f825e2a

Browse files
authored
And there is another one ... (go-gitea#13350)
Signed-off-by: Andrew Thornton <[email protected]>
1 parent 8e38bd1 commit f825e2a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

routers/api/v1/repo/issue_reaction.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,11 @@ func GetIssueCommentReactions(ctx *context.APIContext) {
5656
return
5757
}
5858

59-
if !ctx.Repo.CanRead(models.UnitTypeIssues) {
59+
if err := comment.LoadIssue(); err != nil {
60+
ctx.Error(http.StatusInternalServerError, "comment.LoadIssue", err)
61+
}
62+
63+
if !ctx.Repo.CanReadIssuesOrPulls(comment.Issue.IsPull) {
6064
ctx.Error(http.StatusForbidden, "GetIssueCommentReactions", errors.New("no permission to get reactions"))
6165
return
6266
}

0 commit comments

Comments
 (0)