django-for-runners_ynh/conf/setup_user.py
Jens Diemer 85bb7e5b0b Bugfix Django user permissions
A staff user can't see/change anything ;)
2024-08-25 20:18:07 +02:00

9 lines
263 B
Python

def setup_project_user(user):
"""
All users used the Django admin, so we need to set the "staff" user flag.
Called from django_yunohost_integration.sso_auth
"""
user.is_staff = True
user.is_superuser = True
user.save()
return user