Allow deleting members with payments again #3707
Labels
app:events
Issues regarding the events-app
app:members
Issues regarding the members-app
app:moneybirdsynchronization
Issues regarding the Moneybird synchronization
app:payments
Issues regarding the payments-app
app:pizzas
Issues regarding the pizzas-app
board
Need to involve the board
bug
Something that should be fixed
priority: high
Must be dealt with before the next release is deployed.
security
Security related issues
Milestone
Describe the bug
Since #3417 it's not possible to delete a Member when they've made a payment.
For privacy reasons, the user coudl request being deleted. While we do need to maintain payment history (so the old CASCADE of payments was not correct either), I think we can probably be fine allowing the delete with SET_NULL on Payment.paid_by.
I'm reasonably confident this will work fine:
Something we also need to fix is this CASCADE, and the equivalent in FoodOrder:
concrexit/website/events/models/event_registration.py
Lines 31 to 36 in ad15aba
Basically, if we're deleting a user, we shouldn't CASCADE objects that in the normal dataminimisation simply get their FK to Member set to null. This goes for eventregistrations but also FoodOrder.
How to reproduce
Expected behaviour
There is a warning that people should be very careful about it, but it is allowed.
The text was updated successfully, but these errors were encountered: