-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
Closed
Labels
issue/confirmedIssue has been reviewed and confirmed to be present or accepted to be implementedIssue has been reviewed and confirmed to be present or accepted to be implementedtopic/uiChange the appearance of the Gitea UIChange the appearance of the Gitea UI
Description
We should show both [Owner] as well as [Author] for comment tag. Needs refactoring of commentTag and related code, currently it supports only one tag for each comment.
Lines 653 to 668 in ac3c467
| // commentTag returns the CommentTag for a comment in/with the given repo, poster and issue | |
| func commentTag(repo *models.Repository, poster *models.User, issue *models.Issue) (models.CommentTag, error) { | |
| perm, err := models.GetUserRepoPermission(repo, poster) | |
| if err != nil { | |
| return models.CommentTagNone, err | |
| } | |
| if perm.IsOwner() { | |
| return models.CommentTagOwner, nil | |
| } else if poster.ID == issue.PosterID { | |
| return models.CommentTagPoster, nil | |
| } else if perm.CanWrite(models.UnitTypeCode) { | |
| return models.CommentTagWriter, nil | |
| } | |
| return models.CommentTagNone, nil | |
| } |
Metadata
Metadata
Assignees
Labels
issue/confirmedIssue has been reviewed and confirmed to be present or accepted to be implementedIssue has been reviewed and confirmed to be present or accepted to be implementedtopic/uiChange the appearance of the Gitea UIChange the appearance of the Gitea UI
