fix(team,repo,org,wiki,auth): detect a kept admin permission, validate topics up front, page public members, name disabled wikis, treat auth switch's account as --user

Signed-off-by: bircni <bircni@icloud.com>
This commit is contained in:
bircni committed 2026-10-18 20:40:25 +02:00
1 parent 339527b26c
commit dd2ec74d96
12 files changed
+289 -64

No files matched your search

+4
View File
@@ -434,6 +434,10 @@ $ tea team edit acme/developers --name devs --description "Core developers"`,
return err
}
edited.Organization = team.Organization
// Some Gitea versions keep an admin team admin when permission and units_map are sent together.
if opts.Permission != nil && edited.Permission != "" && edited.Permission != *opts.Permission {
return fmt.Errorf("team %s was edited, but its permission is %s instead of the requested %s; other changes were applied", edited.Slug(), edited.Permission, *opts.Permission)
}
a.done(cmd, "Edited team %s (ID %d)", edited.Slug(), edited.ID)
return a.jsonResult(cmd, edited)
},