mirror of
https://github.com/ansible/awx.git
synced 2026-01-14 11:20:39 -03:30
Remove the remote user existence validation
since we are going to do a confirmation modal dialog instead.
This commit is contained in:
parent
6f4c41a8d3
commit
2aa3fe756e
@ -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
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user