mirror of
https://github.com/go-gitea/gitea.git
synced 2025-08-31 21:12:51 +09: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:
@ -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)
|
||||
|
Reference in New Issue
Block a user