Files
gitea/services
Knight c6791c3c58 fix: clean up orphaned user-keyed tables in deleteUser (#38511)
### Description
This PR addresses orphaned user-keyed tables during user deletion by
adding the missing models to the `db.DeleteBeans` call in
`services/user/delete.go`:
- `auth_model.TwoFactor` (TOTP secrets)
- `auth_model.WebAuthnCredential` (WebAuthn keys)
- `activities_model.Notification` (Notifications)
- `issues_model.IssueWatch` (Issue watches)

Additionally, it adds corresponding unit test coverage in
`services/user/user_test.go` to assert that these records are cleaned up
successfully.

### Related Issues
Fixes #38510

Signed-off-by: pranav718 <raypranav718@gmail.com>
2026-07-18 09:38:36 +02:00
..
2026-07-12 17:14:09 +00:00
2026-07-12 17:14:09 +00:00