I have two groups that I have created in django. I created billing_users and billing_admins. I also have two groups of users in ldap, internalBilling-admin and internalBilling-users.
I currently have django-python3-ldap authentication working. But I have to log into Django and manually set the user as a is_staff and is_superuser to allow the user to login into the admin the default admin console. In addition, I have to assign them to the group that they belong to.
Question 1: Is there a way that I can have the flags automatically set based on the Django group they belong to?
Question 2: Is there a way that I can have the Active Directory user's group set the Django group set the user in the proper Django group using django-python3-ldap?
The author states the following:
The LDAP_AUTH_CLEAN_USER_DATA and LDAP_AUTH_SYNC_USER_RELATIONS settings are your friends here. Check out the docs here:
https://github.com/etianen/django-python3-ldap#available-settings
But I don't understand how LDAP_AUTH_CLEAN_USER_DATA and LDAP_AUTH_SYNC_USER_RELATIONS work because there are no examples of it being implemented.