From 2aa3fe756e6dd10af4baaa1b40599b468d4ef000 Mon Sep 17 00:00:00 2001 From: Jeff Bradberry Date: Wed, 19 May 2021 10:27:51 -0400 Subject: [PATCH] Remove the remote user existence validation since we are going to do a confirmation modal dialog instead. --- awx/api/conf.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/awx/api/conf.py b/awx/api/conf.py index 1a47d46e63..00c712a064 100644 --- a/awx/api/conf.py +++ b/awx/api/conf.py @@ -99,8 +99,6 @@ register( def authentication_validate(serializer, attrs): - from django.contrib.auth.models import User - remote_auth_settings = [ 'AUTH_LDAP_SERVER_URI', 'SOCIAL_AUTH_GOOGLE_OAUTH2_KEY', @@ -114,8 +112,6 @@ def authentication_validate(serializer, attrs): if attrs.get('DISABLE_LOCAL_AUTH', False): if not any(getattr(settings, s, None) for s in remote_auth_settings): raise serializers.ValidationError(_("There are no remote authentication systems configured.")) - if not User.objects.exclude(profile__ldap_dn='', enterprise_auth__isnull=True, social_auth__isnull=True).exists(): - raise serializers.ValidationError(_("There are no remote users in the system.")) return attrs