Skip to content

Commit

Permalink
Fix bug on detect issue/comment writer (go-gitea#17591)
Browse files Browse the repository at this point in the history
  • Loading branch information
lunny authored and Stelios Malathouras committed Mar 28, 2022
1 parent 5982627 commit 09d5c1e
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 09d5c1e

Please sign in to comment.