]> source.dussan.org Git - gitea.git/commit
Fix GPG key deletion during account deletion (#14561) (#14569)
authorAnton Khimich <anton.khimich@gmail.com>
Thu, 4 Feb 2021 20:28:48 +0000 (15:28 -0500)
committerGitHub <noreply@github.com>
Thu, 4 Feb 2021 20:28:48 +0000 (21:28 +0100)
commitda7a525c5c96e97126d5932f3a08fabfaef11b46
tree943f7f0f7adf17d4d4adceee7b383197f9dccbb5
parent014313134f72ebb2ca57eb2e5cd42726231f8fff
Fix GPG key deletion during account deletion (#14561) (#14569)

Per #14531, deleting a user account will delete the user's GPG keys
from the `gpg_key` table but not from `gpg_key_import`, which causes
an error when creating an account with the same email and attempting
to re-add the same key. This commit deletes all entries from
`gpg_key_import` that match any GPG key IDs belonging to the user.

Co-authored-by: Anton Khimich <anton.khimicha@mail.utoronto.ca>
models/gpg_key.go
models/user.go