chore: SMTP Name and Password validation removed

This commit is contained in:
gurusainath 2024-05-03 12:40:44 +05:30
parent 85a64955b7
commit 04df4bfd09
3 changed files with 2 additions and 4 deletions

View File

@ -44,7 +44,7 @@ class MagicCodeProvider(CredentialAdapter):
) )
) )
if not (EMAIL_HOST and EMAIL_HOST_USER and EMAIL_HOST_PASSWORD): if not (EMAIL_HOST):
raise ImproperlyConfigured( raise ImproperlyConfigured(
"SMTP is not configured. Please contact the support team." "SMTP is not configured. Please contact the support team."
) )

View File

@ -96,7 +96,7 @@ class ForgotPasswordEndpoint(APIView):
) )
) )
if not (EMAIL_HOST and EMAIL_HOST_USER and EMAIL_HOST_PASSWORD): if not (EMAIL_HOST):
return Response( return Response(
{ {
"error_code": "SMTP_NOT_CONFIGURED", "error_code": "SMTP_NOT_CONFIGURED",

View File

@ -150,8 +150,6 @@ class InstanceEndpoint(BaseAPIView):
# is smtp configured # is smtp configured
data["is_smtp_configured"] = ( data["is_smtp_configured"] = (
bool(EMAIL_HOST) bool(EMAIL_HOST)
and bool(EMAIL_HOST_USER)
and bool(EMAIL_HOST_PASSWORD)
) )
instance_data = serializer.data instance_data = serializer.data
instance_data["workspaces_exist"] = Workspace.objects.count() > 1 instance_data["workspaces_exist"] = Workspace.objects.count() > 1