aboutsummaryrefslogtreecommitdiff
path: root/internal/route/repo/issue.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/route/repo/issue.go')
-rw-r--r--internal/route/repo/issue.go11
1 files changed, 10 insertions, 1 deletions
diff --git a/internal/route/repo/issue.go b/internal/route/repo/issue.go
index cf59856e..f6a0d1b5 100644
--- a/internal/route/repo/issue.go
+++ b/internal/route/repo/issue.go
@@ -612,7 +612,16 @@ func viewIssue(c *context.Context, isPullList bool) {
if repo.IsOwnedBy(comment.PosterID) ||
(repo.Owner.IsOrganization() && repo.Owner.IsOwnedBy(comment.PosterID)) {
comment.ShowTag = db.COMMENT_TAG_OWNER
- } else if comment.Poster.IsWriterOfRepo(repo) {
+ } else if db.Perms.Authorize(
+ c.Req.Context(),
+ comment.PosterID,
+ repo.ID,
+ db.AccessModeWrite,
+ db.AccessModeOptions{
+ OwnerID: repo.OwnerID,
+ Private: repo.IsPrivate,
+ },
+ ) {
comment.ShowTag = db.COMMENT_TAG_WRITER
} else if comment.PosterID == issue.PosterID {
comment.ShowTag = db.COMMENT_TAG_POSTER