diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2021-11-09 16:00:40 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-09 16:00:40 +0800 |
commit | 1cec7f5ab5e4a02b68a4223f1ad0166118a6e953 (patch) | |
tree | 6f2aeef213b59a79219f98e7d24093d1889e002d | |
parent | 1cb1101d44f797732d98abdcf8ef6ef2cc0ecd6a (diff) | |
download | gitea-1cec7f5ab5e4a02b68a4223f1ad0166118a6e953.tar.gz gitea-1cec7f5ab5e4a02b68a4223f1ad0166118a6e953.zip |
Fix bug on detect issue/comment writer (#17592)
-rw-r--r-- | routers/web/repo/issue.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/web/repo/issue.go b/routers/web/repo/issue.go index 4f6daa3b73..30cfc23ee6 100644 --- a/routers/web/repo/issue.go +++ b/routers/web/repo/issue.go @@ -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 } |