diff --git a/InvenTree/InvenTree/settings.py b/InvenTree/InvenTree/settings.py index d3a5ee919d..24ba9278c8 100644 --- a/InvenTree/InvenTree/settings.py +++ b/InvenTree/InvenTree/settings.py @@ -163,7 +163,7 @@ LOGGING = { }, } -MIDDLEWARE = [ +MIDDLEWARE = CONFIG.get('middleware', [ 'django.middleware.security.SecurityMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.locale.LocaleMiddleware', @@ -173,9 +173,12 @@ MIDDLEWARE = [ 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', - 'InvenTree.middleware.AuthRequiredMiddleware' -] +]) + +AUTHENTICATION_BACKENDS = CONFIG.get('authentication_backends', [ + 'django.contrib.auth.backends.ModelBackend' +]) # If the debug toolbar is enabled, add the modules if DEBUG and CONFIG.get('debug_toolbar', False):