REST API: Problems with addresses and memberships after deleting a user.

Bug #1074374 reported by Florian Fuchs
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
GNU Mailman
Fix Released
High
Barry Warsaw

Bug Description

Hi Barry,

I ran into some trouble after deleting a user account via the rest API. Apparently the user's address records were kept, which lead to two problems:

- Memberships cannot be retrieved via rest any more.
- The deleted user cannot be created again using any of their previous addresses.

Steps to reproduce:

1) Create a user through the REST API
2) Delete that user through the REST API

3) Repeat step 1) (possibly because a person wants to register again after leaving)
=> 500 status code is returned through the REST -- ExistingAddressError is raised.

4) Access /3.0/addresses
=> Result still contains the email address used in 1).

5) Access /3.0/members
=> 500 status code is returned

As a workaround, I tried to delete all the user's addresses through the API, but doing that returned 405 (Method not allowed).

Wouldn't it be best to delete all address/membership records from the db when a user record is deleted?

Cheers
Florian

Barry Warsaw (barry)
Changed in mailman:
status: New → In Progress
importance: Undecided → High
milestone: none → 3.0.0b3
Barry Warsaw (barry)
Changed in mailman:
status: In Progress → Fix Committed
Barry Warsaw (barry)
Changed in mailman:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.