1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-15 23:17:19 +00:00

Enable gocritic equalFold and fix issues (#34952)

Continuation of https://github.com/go-gitea/gitea/pull/34678.

---------

Signed-off-by: silverwind <me@silverwind.io>
This commit is contained in:
silverwind
2025-07-06 18:53:34 +02:00
committed by GitHub
parent ba943fb773
commit 95a935aca0
16 changed files with 21 additions and 22 deletions

View File

@@ -145,7 +145,7 @@ func repoAssignment() func(ctx *context.APIContext) {
)
// Check if the user is the same as the repository owner.
if ctx.IsSigned && ctx.Doer.LowerName == strings.ToLower(userName) {
if ctx.IsSigned && strings.EqualFold(ctx.Doer.LowerName, userName) {
owner = ctx.Doer
} else {
owner, err = user_model.GetUserByName(ctx, userName)