From 716a35779c7ab4d30bf84c704bef404655dac8dd Mon Sep 17 00:00:00 2001 From: Nikhil <118773738+pablohashescobar@users.noreply.github.com> Date: Mon, 24 Jun 2024 12:54:20 +0530 Subject: [PATCH] chore: remove set password option in space app (#4912) --- apiserver/plane/authentication/views/space/magic.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/apiserver/plane/authentication/views/space/magic.py b/apiserver/plane/authentication/views/space/magic.py index 0e859d44d..52a1d0422 100644 --- a/apiserver/plane/authentication/views/space/magic.py +++ b/apiserver/plane/authentication/views/space/magic.py @@ -20,7 +20,7 @@ from plane.authentication.utils.login import user_login from plane.bgtasks.magic_link_code_task import magic_link from plane.license.models import Instance from plane.authentication.utils.host import base_host -from plane.db.models import User, Profile +from plane.db.models import User from plane.authentication.adapter.error import ( AuthenticationException, AUTHENTICATION_ERROR_CODES, @@ -121,12 +121,7 @@ class MagicSignInSpaceEndpoint(View): # Login the user and record his device info user_login(request=request, user=user, is_space=True) # redirect to referer path - profile = Profile.objects.get(user=user) - if user.is_password_autoset and profile.is_onboarded: - path = "accounts/set-password" - else: - # Get the redirection path - path = str(next_path) if next_path else "" + path = str(next_path) if next_path else "" url = f"{base_host(request=request, is_space=True)}{path}" return HttpResponseRedirect(url)