1
0
Fork 0
mirror of synced 2024-09-29 08:41:15 +13:00
ArchiveBox/archivebox/core/auth_ldap.py

12 lines
253 B
Python
Raw Normal View History

from django.conf import settings
from ..config import (
LDAP_CREATE_SUPERUSER
)
def create_user(sender, user=None, ldap_user=None, **kwargs):
if not user.id and LDAP_CREATE_SUPERUSER:
user.is_superuser = True
user.is_staff = True