chore: remove set password option in space app (#4912)
This commit is contained in:
parent
ce9d541981
commit
716a35779c
1 changed files with 2 additions and 7 deletions
|
|
@ -20,7 +20,7 @@ from plane.authentication.utils.login import user_login
|
||||||
from plane.bgtasks.magic_link_code_task import magic_link
|
from plane.bgtasks.magic_link_code_task import magic_link
|
||||||
from plane.license.models import Instance
|
from plane.license.models import Instance
|
||||||
from plane.authentication.utils.host import base_host
|
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 (
|
from plane.authentication.adapter.error import (
|
||||||
AuthenticationException,
|
AuthenticationException,
|
||||||
AUTHENTICATION_ERROR_CODES,
|
AUTHENTICATION_ERROR_CODES,
|
||||||
|
|
@ -121,11 +121,6 @@ class MagicSignInSpaceEndpoint(View):
|
||||||
# Login the user and record his device info
|
# Login the user and record his device info
|
||||||
user_login(request=request, user=user, is_space=True)
|
user_login(request=request, user=user, is_space=True)
|
||||||
# redirect to referer path
|
# 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}"
|
url = f"{base_host(request=request, is_space=True)}{path}"
|
||||||
return HttpResponseRedirect(url)
|
return HttpResponseRedirect(url)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue