-
Notifications
You must be signed in to change notification settings - Fork 0
How to Delete Your User
W. Bomar edited this page Nov 16, 2021
·
4 revisions
Some tasks require a developer to delete their user.
- Test Onboarding as a user.
-
(Optional) Completely shut down all of your containers and restart them.
-
Login to docker shell:
docker exec -it core_portal_django /bin/bash
-
Enter python shell:
python manage.py shell
-
Find & Delete your user:
from django.contrib.auth import get_user_model from portal.apps.onboarding.models import SetupEvent # Get your user model (change "my_username" to your username) my_user = get_user_model().objects.get(username="my_username") # Inspect your user setup events, if things go wrong and we need additional debugging data events = SetupEvent.objects.all().filter(user=my_user) print(events) # Delete your local user to reset your onboarding state my_user.delete()
If you are superuser, you can delete a user from the web interface. However, to become superuser you had to get into the shell anyway to perform steps from How to Set Your User as Staff or Superuser.
- Source: Confluence "Testing task/FP-702" (and a Slack reference)
TACC ACI WMA Core-Portal Project Documentation