diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2021-11-09 15:44:12 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-09 15:44:12 +0800 |
commit | 03de5934027ee5fcfb517016f27a4471f2bdd846 (patch) | |
tree | 2771783c8a3bc4c24195e9665a37341771d363af | |
parent | 021df29623bb0155b5a2ccad0e5f90fb348c8f4e (diff) | |
download | gitea-03de5934027ee5fcfb517016f27a4471f2bdd846.tar.gz gitea-03de5934027ee5fcfb517016f27a4471f2bdd846.zip |
Fix bug on detect issue/comment writer (#17591)
-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 0816d41340..8f09f95172 100644 --- a/routers/web/repo/issue.go +++ b/routers/web/repo/issue.go @@ -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 } |