-
Notifications
You must be signed in to change notification settings - Fork 0
How to Set Your User as Staff or Superuser
Wesley B edited this page May 17, 2023
·
6 revisions
Some tasks require a developer to have a user with staff-level permissions.
- Test Onboarding as an admin (at URL
/workbench/onboarding/admin
).
-
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 & Update your user:
from django.contrib.auth import get_user_model my_user = get_user_model().objects.get(username="my_username") # Set your local user to be "staff" or "superuser" my_user.is_staff = True my_user.is_superuser = True my_user.save()
-
(If needed) Inspect
SetupEvent
s to view logsfrom portal.apps.onboarding.models import SetupEvent # Get your user model (change "my_username" to your 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)
TACC ACI WMA Core-Portal Project Documentation