query groups for ldap users
This commit is contained in:
parent
5fce1fb288
commit
985d477ef6
1 changed files with 10 additions and 1 deletions
|
@ -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",
|
||||
|
|
Loading…
Reference in a new issue