Skip to content

Commit

Permalink
Fix bug on detect issue/comment writer (#17591)
Browse files Browse the repository at this point in the history
  • Loading branch information
lunny committed Nov 9, 2021
1 parent 021df29 commit 03de593
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion routers/web/repo/issue.go
Original file line number Diff line number Diff line change
Expand Up @@ -1041,7 +1041,7 @@ func commentTag(repo *models.Repository, poster *models.User, issue *models.Issu
return models.CommentTagNone, err
}

if perm.CanWrite(models.UnitTypeCode) {
if perm.CanWriteIssuesOrPulls(issue.IsPull) {
return models.CommentTagWriter, nil
}

Expand Down

0 comments on commit 03de593

Please sign in to comment.