mirror of
https://gitea.com/gitea/tea.git
synced 2026-10-26 11:01:25 +01:00
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:
12 files changed
+289
-64
No files matched your search
@@ -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)
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user