From 04df4bfd097ac6fd772bb9769c948adf8e67bee6 Mon Sep 17 00:00:00 2001 From: gurusainath Date: Fri, 3 May 2024 12:40:44 +0530 Subject: [PATCH] chore: SMTP Name and Password validation removed --- .../plane/authentication/provider/credentials/magic_code.py | 2 +- apiserver/plane/authentication/views/common.py | 2 +- apiserver/plane/license/api/views/instance.py | 2 -- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/apiserver/plane/authentication/provider/credentials/magic_code.py b/apiserver/plane/authentication/provider/credentials/magic_code.py index d49f19429..7ac9578fe 100644 --- a/apiserver/plane/authentication/provider/credentials/magic_code.py +++ b/apiserver/plane/authentication/provider/credentials/magic_code.py @@ -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( "SMTP is not configured. Please contact the support team." ) diff --git a/apiserver/plane/authentication/views/common.py b/apiserver/plane/authentication/views/common.py index 693054596..f3acb1686 100644 --- a/apiserver/plane/authentication/views/common.py +++ b/apiserver/plane/authentication/views/common.py @@ -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( { "error_code": "SMTP_NOT_CONFIGURED", diff --git a/apiserver/plane/license/api/views/instance.py b/apiserver/plane/license/api/views/instance.py index 40b3c7e0d..2247bbeb1 100644 --- a/apiserver/plane/license/api/views/instance.py +++ b/apiserver/plane/license/api/views/instance.py @@ -150,8 +150,6 @@ class InstanceEndpoint(BaseAPIView): # is smtp configured data["is_smtp_configured"] = ( bool(EMAIL_HOST) - and bool(EMAIL_HOST_USER) - and bool(EMAIL_HOST_PASSWORD) ) instance_data = serializer.data instance_data["workspaces_exist"] = Workspace.objects.count() > 1