Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: when deleting a user, delete the users keys too #3462

Merged
merged 3 commits into from
Jun 30, 2023

Conversation

shreddedbacon
Copy link
Member

Checklist

  • Affected Issues have been mentioned in the Closing issues section
  • Documentation has been written/updated
  • PR title is ready for inclusion in changelog

Currently if a user is deleted, their SSH keys remain in the database.

For example, if we have John Smith and they have an existing account with jsmith@example.com and their single ssh key attached to the user, but Johns account is accidentally deleted. A new account is created, but when John attempts to re-add the key, it fails because the key is already in the database linked to the previous account.

Closing issues

closes #2398

@shreddedbacon shreddedbacon marked this pull request as ready for review June 20, 2023 03:11
@shreddedbacon shreddedbacon added this to the 2.16.x milestone Jun 20, 2023
services/api/src/resources/user/helpers.ts Outdated Show resolved Hide resolved
services/api/src/resources/user/sql.ts Outdated Show resolved Hide resolved
@tobybellwood tobybellwood modified the milestones: 2.16.x, v2.15.2 Jun 30, 2023
@tobybellwood tobybellwood merged commit dfa31e2 into main Jun 30, 2023
@tobybellwood tobybellwood deleted the deleted-user-sshkeys-cleanup branch June 30, 2023 04:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ssh key not removed when delete user
3 participants