[PR #3059] [MERGED] Delete a user's public key via admin api (closes #3014) #16737

Closed
opened 2025-11-02 12:17:51 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/go-gitea/gitea/pull/3059
Author: @vtemian
Created: 12/2/2017
Status: Merged
Merged: 12/6/2017
Merged by: @lafriks

Base: masterHead: delete-user-key-as-admin-3014


📝 Commits (8)

  • 046bcbf Delete a user's public key via admin api
  • 53aeb46 Test admin ssh endpoint for creating a new ssh key
  • fba98ba Adapt public ssh key test to also test the delete operation
  • c9786a5 Test that deleting a missing key will result in a 404
  • 19fa201 Test that a normal user can't delete another user's ssh key
  • 65871ea Make DeletePublicKey return err
  • 02300f5 Update swagger doc
  • 6bf1fbf Merge branch 'master' into delete-user-key-as-admin-3014

📊 Changes

6 files changed (+324 additions, -11 deletions)

View changed files

integrations/api_admin_test.go (+73 -0)
📝 models/ssh_key.go (+1 -4)
📝 public/swagger.v1.json (+196 -5)
📝 routers/api/v1/admin/user.go (+45 -0)
📝 routers/api/v1/api.go (+4 -1)
📝 routers/api/v1/user/key.go (+5 -1)

📄 Description

Let admin delete a user's key via API


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/go-gitea/gitea/pull/3059 **Author:** [@vtemian](https://github.com/vtemian) **Created:** 12/2/2017 **Status:** ✅ Merged **Merged:** 12/6/2017 **Merged by:** [@lafriks](https://github.com/lafriks) **Base:** `master` ← **Head:** `delete-user-key-as-admin-3014` --- ### 📝 Commits (8) - [`046bcbf`](https://github.com/go-gitea/gitea/commit/046bcbf22197e168f3d922610d7745e3ee87163b) Delete a user's public key via admin api - [`53aeb46`](https://github.com/go-gitea/gitea/commit/53aeb4628e105a18516a4d0bf30a532968eed995) Test admin ssh endpoint for creating a new ssh key - [`fba98ba`](https://github.com/go-gitea/gitea/commit/fba98ba24ab6a89f6f9877d387ba6057b8891bfa) Adapt public ssh key test to also test the delete operation - [`c9786a5`](https://github.com/go-gitea/gitea/commit/c9786a5bd20b83c73dbf8806c85e38449666ba3a) Test that deleting a missing key will result in a 404 - [`19fa201`](https://github.com/go-gitea/gitea/commit/19fa2012d997c3e03630aadade23d722e55592c7) Test that a normal user can't delete another user's ssh key - [`65871ea`](https://github.com/go-gitea/gitea/commit/65871eaf990c3f491e778bb4ed51a57d269be263) Make DeletePublicKey return err - [`02300f5`](https://github.com/go-gitea/gitea/commit/02300f594f86cc09845bbbf55177fa0d5ae4755b) Update swagger doc - [`6bf1fbf`](https://github.com/go-gitea/gitea/commit/6bf1fbf5a5ca0d17765d08158b51499e7fb14183) Merge branch 'master' into delete-user-key-as-admin-3014 ### 📊 Changes **6 files changed** (+324 additions, -11 deletions) <details> <summary>View changed files</summary> ➕ `integrations/api_admin_test.go` (+73 -0) 📝 `models/ssh_key.go` (+1 -4) 📝 `public/swagger.v1.json` (+196 -5) 📝 `routers/api/v1/admin/user.go` (+45 -0) 📝 `routers/api/v1/api.go` (+4 -1) 📝 `routers/api/v1/user/key.go` (+5 -1) </details> ### 📄 Description Let admin delete a user's key via API --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2025-11-02 12:17:51 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#16737