mirror of
https://github.com/go-gitea/gitea.git
synced 2025-06-21 21:48:00 +02:00
* Delete a user's public key via admin api * Test admin ssh endpoint for creating a new ssh key * Adapt public ssh key test to also test the delete operation * Test that deleting a missing key will result in a 404 * Test that a normal user can't delete another user's ssh key * Make DeletePublicKey return err * Update swagger doc
This commit is contained in:
@ -542,7 +542,10 @@ func RegisterRoutes(m *macaron.Macaron) {
|
||||
m.Group("/:username", func() {
|
||||
m.Combo("").Patch(bind(api.EditUserOption{}), admin.EditUser).
|
||||
Delete(admin.DeleteUser)
|
||||
m.Post("/keys", bind(api.CreateKeyOption{}), admin.CreatePublicKey)
|
||||
m.Group("/keys", func() {
|
||||
m.Post("", bind(api.CreateKeyOption{}), admin.CreatePublicKey)
|
||||
m.Delete("/:id", admin.DeleteUserPublicKey)
|
||||
})
|
||||
m.Post("/orgs", bind(api.CreateOrgOption{}), admin.CreateOrg)
|
||||
m.Post("/repos", bind(api.CreateRepoOption{}), admin.CreateRepo)
|
||||
})
|
||||
|
Reference in New Issue
Block a user