forked from ungleich-public/dynamicweb
Use plain Django login in dev when no LDAP server is configured
This commit is contained in:
parent
96639c4d4b
commit
07de15c795
1 changed files with 8 additions and 0 deletions
|
|
@ -26,3 +26,11 @@ INSTALLED_APPS += (
|
|||
# debug_toolbar seems to conflict with multisite (and djangocms_multisite)
|
||||
# 'debug_toolbar'
|
||||
)
|
||||
|
||||
# Without an LDAP server (e.g. the docker test stack) log in with plain Django
|
||||
# authentication, otherwise every successful login fails creating the LDAP account
|
||||
if not AUTH_LDAP_SERVER:
|
||||
AUTHENTICATION_BACKENDS = tuple(
|
||||
'django.contrib.auth.backends.ModelBackend'
|
||||
if backend == 'utils.backend.MyLDAPBackend' else backend
|
||||
for backend in AUTHENTICATION_BACKENDS)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue