-
Notifications
You must be signed in to change notification settings - Fork 1
How to Set Your User as Staff (or Superuser)
Wesley B edited this page May 17, 2023
·
3 revisions
After a user logs in via Portal, they cannot immediately login to CMS. Their user must be given "Staff status".
- Login.
- Visit Django CMS admin.
- Find and edit the user to become staff.
- Check the "Staff status" checkbox.
- Save.
-
Completely shut down all of your containers and restart them.
-
Login to docker shell:
docker exec -it core_portal_cms /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-CMS Project Documentation