mirror of
https://github.com/zulip/zulip.git
synced 2025-11-11 01:16:19 +00:00
Fix the SSO path to support mirror dummies
The SSO flow which was never used on a realm with mirror dummies before. Also change the redirect to stay on the same doain. (imported from commit 0f1b8a8fcef82ae6eaa5a264686f98d62a683fac)
This commit is contained in:
@@ -618,7 +618,7 @@ def maybe_send_to_registration(request, email, full_name=''):
|
|||||||
|
|
||||||
return redirect("".join((
|
return redirect("".join((
|
||||||
settings.EXTERNAL_URI_SCHEME,
|
settings.EXTERNAL_URI_SCHEME,
|
||||||
settings.EXTERNAL_HOST,
|
request.get_host(),
|
||||||
"/",
|
"/",
|
||||||
# Split this so we only get the part after the /
|
# Split this so we only get the part after the /
|
||||||
Confirmation.objects.get_link_for_object(prereg_user).split("/", 3)[3],
|
Confirmation.objects.get_link_for_object(prereg_user).split("/", 3)[3],
|
||||||
@@ -631,7 +631,7 @@ def maybe_send_to_registration(request, email, full_name=''):
|
|||||||
context_instance=RequestContext(request))
|
context_instance=RequestContext(request))
|
||||||
|
|
||||||
def login_or_register_remote_user(request, remote_username, user_profile, full_name=''):
|
def login_or_register_remote_user(request, remote_username, user_profile, full_name=''):
|
||||||
if user_profile is None:
|
if user_profile is None or user_profile.is_mirror_dummy:
|
||||||
# Since execution has reached here, the client specified a remote user
|
# Since execution has reached here, the client specified a remote user
|
||||||
# but no associated user account exists. Send them over to the
|
# but no associated user account exists. Send them over to the
|
||||||
# PreregistrationUser flow.
|
# PreregistrationUser flow.
|
||||||
|
|||||||
Reference in New Issue
Block a user