mirror of https://github.com/zulip/zulip.git
web_public_guest: Rename to web_public_visitor for clarity.
Using web_public_guest for anonymous users is confusing since 'guest' is actually a logged-in user compared to web_public_guest which is not logged-in and has only read access to messages. So, we rename it to web_public_visitor.
This commit is contained in:
parent
7c2c82b190
commit
fbf7cb82a7
|
@ -762,9 +762,9 @@ run_test("electron_bridge", () => {
|
||||||
assert.equal(activity.compute_active_status(), activity.ACTIVE);
|
assert.equal(activity.compute_active_status(), activity.ACTIVE);
|
||||||
});
|
});
|
||||||
|
|
||||||
run_test("test_send_or_receive_no_presence_for_web_public_guest", () => {
|
run_test("test_send_or_receive_no_presence_for_web_public_visitor", () => {
|
||||||
set_global("page_params", {
|
set_global("page_params", {
|
||||||
is_web_public_guest: true,
|
is_web_public_visitor: true,
|
||||||
});
|
});
|
||||||
activity.send_presence_to_server();
|
activity.send_presence_to_server();
|
||||||
});
|
});
|
||||||
|
|
|
@ -176,7 +176,7 @@ exports.send_presence_to_server = function (want_redraw) {
|
||||||
// which will clear suspect_offline and potentially trigger a
|
// which will clear suspect_offline and potentially trigger a
|
||||||
// reload if the device was offline for more than
|
// reload if the device was offline for more than
|
||||||
// DEFAULT_EVENT_QUEUE_TIMEOUT_SECS).
|
// DEFAULT_EVENT_QUEUE_TIMEOUT_SECS).
|
||||||
if (page_params.is_web_public_guest) {
|
if (page_params.is_web_public_visitor) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -168,9 +168,9 @@ function get_events(options) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: In the future, we may implement Tornado support for live
|
// TODO: In the future, we may implement Tornado support for live
|
||||||
// update for web-public guests, but until then, there's nothing
|
// update for web_public_visitor, but until then, there's nothing
|
||||||
// to do here.
|
// to do here.
|
||||||
if (page_params.is_web_public_guest) {
|
if (page_params.is_web_public_visitor) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -779,7 +779,7 @@ def zulip_otp_required(
|
||||||
"""
|
"""
|
||||||
:if_configured: If ``True``, an authenticated user with no confirmed
|
:if_configured: If ``True``, an authenticated user with no confirmed
|
||||||
OTP devices will be allowed. Also, non-authenticated users will be
|
OTP devices will be allowed. Also, non-authenticated users will be
|
||||||
allowed as web_public_guest users. Default is ``False``. If ``False``,
|
allowed as web_public_visitor users. Default is ``False``. If ``False``,
|
||||||
2FA will not do any authentication.
|
2FA will not do any authentication.
|
||||||
"""
|
"""
|
||||||
if_configured = settings.TWO_FACTOR_AUTHENTICATION_ENABLED
|
if_configured = settings.TWO_FACTOR_AUTHENTICATION_ENABLED
|
||||||
|
|
|
@ -177,7 +177,7 @@ def build_page_params_for_home_page_load(
|
||||||
# Adding two_fa_enabled as condition saves us 3 queries when
|
# Adding two_fa_enabled as condition saves us 3 queries when
|
||||||
# 2FA is not enabled.
|
# 2FA is not enabled.
|
||||||
two_fa_enabled_user=two_fa_enabled and bool(default_device(user_profile)),
|
two_fa_enabled_user=two_fa_enabled and bool(default_device(user_profile)),
|
||||||
is_web_public_guest=user_profile is None,
|
is_web_public_visitor=user_profile is None,
|
||||||
)
|
)
|
||||||
|
|
||||||
undesired_register_ret_fields = [
|
undesired_register_ret_fields = [
|
||||||
|
|
|
@ -459,10 +459,10 @@ Output:
|
||||||
and not for a logged-out web-public visitor."""
|
and not for a logged-out web-public visitor."""
|
||||||
self.assertEqual(result.status_code, 200)
|
self.assertEqual(result.status_code, 200)
|
||||||
page_params = self._get_page_params(result)
|
page_params = self._get_page_params(result)
|
||||||
# It is important to check `is_web_public_guest` to verify
|
# It is important to check `is_web_public_visitor` to verify
|
||||||
# that we treated this request as a normal logged-in session,
|
# that we treated this request as a normal logged-in session,
|
||||||
# not as a web-public visitor.
|
# not as a web-public visitor.
|
||||||
self.assertEqual(page_params['is_web_public_guest'], False)
|
self.assertEqual(page_params['is_web_public_visitor'], False)
|
||||||
|
|
||||||
def login_with_return(self, email: str, password: Optional[str]=None,
|
def login_with_return(self, email: str, password: Optional[str]=None,
|
||||||
**kwargs: Any) -> HttpResponse:
|
**kwargs: Any) -> HttpResponse:
|
||||||
|
|
|
@ -85,7 +85,7 @@ class HomeTest(ZulipTestCase):
|
||||||
"is_admin",
|
"is_admin",
|
||||||
"is_guest",
|
"is_guest",
|
||||||
"is_owner",
|
"is_owner",
|
||||||
"is_web_public_guest",
|
"is_web_public_visitor",
|
||||||
"jitsi_server_url",
|
"jitsi_server_url",
|
||||||
"language_list",
|
"language_list",
|
||||||
"language_list_dbl_col",
|
"language_list_dbl_col",
|
||||||
|
|
Loading…
Reference in New Issue