mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 13:33:24 +00:00
auth: Add login buttons for web public access.
For users who are not logged in and for those who don't have 'prefers_web_public_view' set in session, we redirect them to the default login page where they can choose to login as spectator or authenticated user.
This commit is contained in:
@@ -389,9 +389,7 @@ def zulip_redirect_to_login(
|
||||
):
|
||||
path = request.get_full_path()
|
||||
|
||||
# TODO: Restore testing for this case; it was removed when
|
||||
# we enabled web-public stream testing on /.
|
||||
if path == "/": # nocoverage
|
||||
if path == "/":
|
||||
# Don't add ?next=/, to keep our URLs clean
|
||||
return HttpResponseRedirect(resolved_login_url)
|
||||
return redirect_to_login(path, resolved_login_url, redirect_field_name)
|
||||
|
||||
Reference in New Issue
Block a user