mirror of https://github.com/go-gitea/gitea.git
Add more check
This commit is contained in:
parent
d74263430f
commit
ec8fbde2c7
|
@ -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 New Issue