Skip to content
Snippets Groups Projects
piplines.py 243 B
Newer Older
  • Learn to ignore specific revisions
  • from django.conf import settings
    
    
    def make_otf_staff(backend, user, response, *args, **kwargs):
        _, email_domain = user.email.split('@')
        if email_domain in settings.STAFF_EMAIL_DOMAINS:
            user.is_staff = True
            user.save()