|
|
@@ -276,6 +276,8 @@ class LdapBackend(object):
|
|
|
existing_profile = get_profile(existing_user)
|
|
|
if existing_profile.creation_method == str(UserProfile.CreationMethod.EXTERNAL):
|
|
|
is_super = User.objects.get(username=username).is_superuser
|
|
|
+ elif not desktop.conf.LDAP.CREATE_USERS_ON_LOGIN.get():
|
|
|
+ return None
|
|
|
|
|
|
try:
|
|
|
user = self._backend.authenticate(username, password)
|
|
|
@@ -309,7 +311,6 @@ class LdapBackend(object):
|
|
|
return True
|
|
|
|
|
|
|
|
|
-
|
|
|
class SpnegoDjangoBackend(django.contrib.auth.backends.ModelBackend):
|
|
|
"""
|
|
|
A note about configuration:
|