mirror of
https://github.com/go-gitea/gitea.git
synced 2026-08-06 14:36:43 +02:00
Add more check
This commit is contained in:
@@ -224,6 +224,11 @@ func UpdateTeam(ctx context.Context, t *organization.Team, updateCols ...string)
|
||||
return util.NewInvalidArgumentErrorf("empty team name")
|
||||
}
|
||||
|
||||
if slices.Contains(updateCols, "name") && !slices.Contains(updateCols, "lower_name") {
|
||||
t.LowerName = strings.ToLower(t.Name)
|
||||
updateCols = append(updateCols, "lower_name")
|
||||
}
|
||||
|
||||
authChanged := slices.Contains(updateCols, "authorize")
|
||||
includeAllChanged := slices.Contains(updateCols, "includes_all_repositories")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user