Fix bug on detect issue/comment writer (#17592)

release/v1.15
Lunny Xiao 2021-11-09 16:00:40 +08:00 committed by GitHub
parent 1cb1101d44
commit 1cec7f5ab5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -1019,7 +1019,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
}