Moved azure login to local app. Removed ability for new users to be created automatically
This commit is contained in:
@@ -34,6 +34,7 @@ ALLOWED_HOSTS = os.environ.get('ALLOWED_HOSTS').split(' ')
|
||||
INSTALLED_APPS = [
|
||||
'coord.apps.CoordConfig',
|
||||
# 'mail_templates.apps.MailTemplatesConfig',
|
||||
'custom_user.apps.CustomUserConfig',
|
||||
'django.contrib.admin',
|
||||
'django.contrib.auth',
|
||||
'django.contrib.contenttypes',
|
||||
@@ -42,7 +43,6 @@ INSTALLED_APPS = [
|
||||
'django.contrib.staticfiles',
|
||||
'import_export',
|
||||
'rangefilter',
|
||||
'azure_auth',
|
||||
]
|
||||
|
||||
TWILIO = {
|
||||
@@ -65,8 +65,8 @@ MIDDLEWARE = [
|
||||
]
|
||||
|
||||
if "AZURE_CLIENT_ID" in os.environ:
|
||||
AUTHENTICATION_BACKENDS = ("azure_auth.backends.AzureBackend",)
|
||||
MIDDLEWARE.append('azure_auth.middleware.AzureMiddleware')
|
||||
AUTHENTICATION_BACKENDS = ("custom_user.backends.AzureBackend",)
|
||||
MIDDLEWARE.append('custom_user.middleware.AzureMiddleware')
|
||||
LOGIN_URL = "/azure_auth/login"
|
||||
AZURE_AUTH = {
|
||||
"CLIENT_ID": os.environ.get('AZURE_CLIENT_ID'),
|
||||
|
||||
Reference in New Issue
Block a user