aboutsummaryrefslogtreecommitdiffstats
path: root/routers/api/v1/repo/issue_comment_attachment.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/api/v1/repo/issue_comment_attachment.go')
-rw-r--r--routers/api/v1/repo/issue_comment_attachment.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/routers/api/v1/repo/issue_comment_attachment.go b/routers/api/v1/repo/issue_comment_attachment.go
index 121e3f10e0..0a85116927 100644
--- a/routers/api/v1/repo/issue_comment_attachment.go
+++ b/routers/api/v1/repo/issue_comment_attachment.go
@@ -325,6 +325,10 @@ func getIssueCommentSafe(ctx *context.APIContext) *issues_model.Comment {
return nil
}
+ if !ctx.Repo.CanReadIssuesOrPulls(comment.Issue.IsPull) {
+ return nil
+ }
+
comment.Issue.Repo = ctx.Repo.Repository
return comment