Closes #5033: Support backward compatibility for REMOTE_AUTH_BACKEND

This commit is contained in:
Jeremy Stretch
2020-08-22 20:39:46 -04:00
parent 2116b928b6
commit 728088f5fa
2 changed files with 10 additions and 1 deletions

View File

@@ -142,6 +142,13 @@ if type(REMOTE_AUTH_DEFAULT_PERMISSIONS) is not dict:
)
except TypeError:
raise ImproperlyConfigured("REMOTE_AUTH_DEFAULT_PERMISSIONS must be a dictionary.")
# Backward compatibility for REMOTE_AUTH_BACKEND
if REMOTE_AUTH_BACKEND == 'utilities.auth_backends.RemoteUserBackend':
warnings.warn(
"RemoteUserBackend has moved! Please update your configuration to:\n"
" REMOTE_AUTH_BACKEND='netbox.authentication.RemoteUserBackend'"
)
REMOTE_AUTH_BACKEND = 'netbox.authentication.RemoteUserBackend'
#