authentication - How to use django_python3_ldap auth and django default auth at same time -
i making dajnago 1.8 application (using python3), want admin users (is_staff = true) can loggin through ldap server , admin superusers (is_superuser = true) can logged in using default django auth. using django_python3_ldap ldap loggin backend, , django admin site administaration. now, application seems allways auth users through ldap backend , don't use default authentication backend, , want if connection ldap server fails use default authentication backend. need create own admin site or can apply configuration purpose. thanks.
have set authentication backends this?
authentication_backends = ( 'django.contrib.auth.backends.modelbackend', 'django_python3_ldap.auth.ldapbackend', )
that should try both given credentials. if succeeds on modelbackend, not attempt try ldap. goes through them sequentially until find 1 works.
Comments
Post a Comment