Removing deploy key doesn't actually remove

Summary

Removing deploy keys doesn't actually remove them if they've been linked to another project.

Steps to reproduce

  1. I created "project_a" and "project_b"
  2. I added "newkey" to the deploy keys of "project_a"
  3. I enabled the "newkey" on "project_b" since I have access to both projects
  4. When looking at the deploy keys on "project_b" I cannot remove it, only disable it
  5. When looking at the deploy keys on "project_a" I can remove it.

However, when I successfully removed "newkey" from the deploy keys interface of "project_a". It didn't actually destroy the key, and instead seems to have unlinked it from the project.

What is the expected correct behavior?

I expect that they key should be removed, or that there should be an admin-only way of completely destroying any deploy key. Right now it seems the only way to do so is in the rails console.

P.S. this might be more of a feature request, so please let me know if I've mislabeled this.

Edited by Cody West