preload backend to patch authentic2 ldap backend early (fixes #10219)

Kerberos specialized LDAP backend must patch the LDAP backend of authentic2 so
that new setting keys like 'principal_filter' are not reported as unknown.
This commit is contained in:
Benjamin Dauvergne 2016-03-07 10:45:14 +01:00
parent 890e9fd7dc
commit 4feef34875
2 changed files with 14 additions and 2 deletions

View File

@ -1,4 +1,5 @@
__version__ = '1.0.0'
default_app_config = 'authentic2_auth_kerberos.apps.Authentic2AuthKerberosConfig'
class Plugin(object):
def get_before_urls(self):
@ -9,7 +10,8 @@ class Plugin(object):
return [__name__, 'django_kerberos']
def get_authentication_backends(self):
return ['authentic2_auth_kerberos.backends.A2LdapKerberosBackend', 'authentic2_auth_kerberos.backends.A2KerberosBackend']
return ['authentic2_auth_kerberos.backends.A2LdapKerberosBackend',
'authentic2_auth_kerberos.backends.A2KerberosBackend']
def get_auth_frontends(self):
return ['authentic2_auth_kerberos.auth_frontends.KerberosFrontend']

View File

@ -0,0 +1,10 @@
from django.apps import AppConfig
class Authentic2AuthKerberosConfig(AppConfig):
name = 'authentic2_auth_kerberos'
label = 'authentic2_auth_kerberos'
def ready(self):
# patch authentic2.backends.ldap_backend.LDAPBackend for keys specific to Kerberos support
from . import backends