-
Notifications
You must be signed in to change notification settings - Fork 0
How to reset system access step onboarding status of all users
Chandra Y edited this page Oct 15, 2024
·
1 revision
- Connect to portal_django (core_portal_django, if you are on local dev)
docker exec -it portal_django /bin/bash
- attach to shell
python3 manage.py shell
- run
from django.contrib.auth.models import User
from django.core.exceptions import ObjectDoesNotExist
from portal.apps.onboarding.steps.system_access_v3 import SystemAccessStepV3
users = User.objects.all()
for u in users:
try:
u.profile.setup_complete = False
u.profile.save()
setup_step = SystemAccessStepV3(u)
setup_step.prepare()
setup_step.user.profile.setup_complete = False
setup_step.user.profile.save()
except ObjectDoesNotExist:
print(f"Profile not found for user: {u.username}")
continue
TACC ACI WMA Core-Portal Project Documentation