mirror of
https://github.com/go-gitea/gitea
synced 2024-11-24 15:12:48 +01:00
Add more check
This commit is contained in:
parent
d74263430f
commit
ec8fbde2c7
1 changed files with 5 additions and 0 deletions
|
@ -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")
|
||||
|
||||
|
|
Loading…
Reference in a new issue