fix incorrect assumption about when to run the group sync

This commit is contained in:
Max Rink 2021-02-09 10:35:36 +01:00
parent 4b1979f741
commit 273aec2321

View File

@ -153,9 +153,11 @@ class RemoteUserBackend(_RemoteUserBackend):
except UserModel.DoesNotExist:
pass
if self.user_can_authenticate(user):
if remote_groups:
if settings.REMOTE_AUTH_GROUP_SYNC_ENABLED:
if user is not None and not isinstance(user, AnonymousUser):
return self.configure_groups(user,remote_groups)
else:
return user
else:
return None