mitodl / ol-infrastructure

Infrastructure automation code for use by MIT Open Learning
BSD 3-Clause "New" or "Revised" License
45 stars 4 forks source link

Configure open edX retirement #1007

Closed pdpinch closed 1 year ago

pdpinch commented 2 years ago

User Story

As an admin, I need to be able to retire a user who requests their account be deleted. There is a management command for this. Eventually, we'd like to access this feature via API, through mitxonline and xPRO.

See, for example, https://github.com/mitodl/mitxonline/issues/697

Description/Context

Based on the error message:

[openedx.core.djangoapps.user_api.management.commands.retire_user] [user None] [ip None] retire_user.py:97 - 500 error deactivating account Default state does not exist! Populate retirement states to retire users.
CommandError: 500 error deactivating account Default state does not exist! Populate retirement states to retire users.

it seems that some additional configuration is necessary.

There is a blog post that might help, at https://opencraft.com/blog/demystifying-user-retirement-in-the-open-edx-platform/

Acceptance Criteria

blarghmatey commented 2 years ago

Reading through the post it seems like the only thing we're missing is running the management command

blarghmatey commented 2 years ago

I just ran that command against the courses-qa.mitxonline.mit.edu environment so that we can test the behavior before moving to production with it.

blarghmatey commented 2 years ago

It's likely that we'll need to expand on the set of states that we have configured to account for Forum at minimum.