diff --git a/backend/backend/settings.py b/backend/backend/settings.py index bf7e141..1714f7e 100644 --- a/backend/backend/settings.py +++ b/backend/backend/settings.py @@ -31,7 +31,7 @@ DEBUG = True ALLOWED_HOSTS = [] import ldap -from django_auth_ldap.config import LDAPSearch +from django_auth_ldap.config import LDAPSearch, GroupOfNamesType AUTH_LDAP_SERVER_URI = config.ldap.uri AUTH_LDAP_BIND_DN = config.ldap.bind_dn @@ -40,6 +40,15 @@ AUTH_LDAP_USER_SEARCH = LDAPSearch( config.ldap.search_dn, ldap.SCOPE_SUBTREE, config.ldap.search_filter ) + +AUTH_LDAP_GROUP_TYPE = GroupOfNamesType() + +AUTH_LDAP_GROUP_SEARCH = LDAPSearch( + 'ou=roles,dc=neulandlabor,dc=de', + ldap.SCOPE_ONELEVEL, + '(objectClass=groupOfNames)', +) + AUTHENTICATION_BACKENDS = [ "django_auth_ldap.backend.LDAPBackend", "django.contrib.auth.backends.ModelBackend",