mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +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:
@@ -429,7 +429,7 @@ func RepoAssignment(ctx *Context) {
|
||||
}
|
||||
|
||||
// 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) {
|
||||
ctx.Repo.Owner = ctx.Doer
|
||||
} else {
|
||||
ctx.Repo.Owner, err = user_model.GetUserByName(ctx, userName)
|
||||
|
Reference in New Issue
Block a user