kuma icon indicating copy to clipboard operation
kuma copied to clipboard

deleteuser API endpoint

Open peterbe opened this issue 4 years ago • 9 comments

Parent ticket: https://github.com/mdn/sprints/issues/1922

In https://github.com/mdn/kuma/issues/6071 there's going to be a UI where the user clicks to delete hes account and then as part of that UI it needs to figure out whether to bother the user asking them the questions that are demonstrated (in the wiki) in these screenhots: https://github.com/mdn/kuma/pull/6149#issue-344684821

Also, that same endpoint should be able to delete the user. With parameters (based on the user's choice) regarding donating contributions or to scrub the profile entirely clean.

Acceptance Criteria:

  • [ ] You can GET to find out about the user (based on your cookie, not by username in the URL!)
  • [ ] You can POST with -d contributions=keep or -d contributions=donate which will hook into the same machinery as https://github.com/mdn/kuma/pull/6149 implements
  • [ ] The user is "removed"

peterbe avatar Dec 06 '19 14:12 peterbe

Sounds like we're unsure if this can just be pure backend functionality (w/o need for an API endpoint). So we'll wait until we have a clearer understanding on this from @schalkneethling

@schalkneethling can you let us know if you need this functionality provided as an api endpoint or just as a Django object delete?

tobinmori avatar Jan 03 '20 15:01 tobinmori

@schalkneethling What Tobin said. Can you make this issue blocked by whichever issue implements the new UI? I'd suggest we implement the new UI, behind a env var, and land it in master and make it fail on the actual deletion. Then I'll take over from there.

peterbe avatar Jan 03 '20 15:01 peterbe

@peterbe sounds like we won't need an API endpoint for this. Sorry for the false alarm. We will need just a Django object delete, though.

tobinmori avatar Jan 06 '20 16:01 tobinmori

Not going to close the issue though because when we're in Yari there is no Django any more (only JSON APIs). That day we're going to need it but I don't like the thought of building an API just for the sake of building it. So let's leave this open an unassign it.

peterbe avatar Jan 06 '20 16:01 peterbe

Moved it out of the sprint backlog.

tobinmori avatar Jan 07 '20 20:01 tobinmori

@peterbe @tobinmori Should we perhaps close or transfer it to Yari as it will not land in Kuma? Or will Kuma be our API?

schalkneethling avatar Aug 06 '20 07:08 schalkneethling

It will land in Kuma eventually. But I don't think there's any point starting on it until we have switched off the wiki.

peterbe avatar Aug 06 '20 10:08 peterbe

it will not land in Kuma?

It will. When we "port" the functionality from kuma.users.views to kuma.api.v1.views we're going to drastically simplify it since there's no point asking about attributions.

But I think we'll have everyone forcibly donate their attributions to the anonymous user so we can properly delete the user without yet having to delete any rows until Yari has taken over all the file attachments as well.

peterbe avatar Aug 06 '20 11:08 peterbe

+1 Aiming for that one day when Kuma will be just an API service!

tobinmori avatar Aug 06 '20 13:08 tobinmori