Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

web_public_guest: Rename to web_public_visitor for clarity.

Aman Agrawalfbf7cb82a7fb
diff --git a/frontend_tests/node_tests/activity.js b/frontend_tests/node_tests/activity.js
index 892c220d9c2..c2eaf806963 100644
--- a/frontend_tests/node_tests/activity.js
+++ b/frontend_tests/node_tests/activity.js
@@ -762,9 +762,9 @@ run_test("electron_bridge", () => {
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", {
- is_web_public_guest: true,
+ is_web_public_visitor: true,
});
activity.send_presence_to_server();
});
diff --git a/static/js/activity.js b/static/js/activity.js
index 2c20d7f5bb0..75fda02fc61 100644
--- a/static/js/activity.js
+++ b/static/js/activity.js
@@ -176,7 +176,7 @@ exports.send_presence_to_server = function (want_redraw) {
// which will clear suspect_offline and potentially trigger a
// reload if the device was offline for more than
// DEFAULT_EVENT_QUEUE_TIMEOUT_SECS).
- if (page_params.is_web_public_guest) {
+ if (page_params.is_web_public_visitor) {
return;
}
diff --git a/static/js/server_events.js b/static/js/server_events.js
index d7b00c4f929..b1eb7cbf32b 100644
--- a/static/js/server_events.js
+++ b/static/js/server_events.js
@@ -168,9 +168,9 @@ function get_events(options) {
}
// 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.
- if (page_params.is_web_public_guest) {
+ if (page_params.is_web_public_visitor) {
return;
}
diff --git a/zerver/decorator.py b/zerver/decorator.py
index 1aa3da79084..a650aae19dd 100644
--- a/zerver/decorator.py
+++ b/zerver/decorator.py
@@ -779,7 +779,7 @@ def zulip_otp_required(
"""
:if_configured: If ``True``, an authenticated user with no confirmed
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.
"""
if_configured = settings.TWO_FACTOR_AUTHENTICATION_ENABLED
diff --git a/zerver/lib/home.py b/zerver/lib/home.py
index 37006b3a1fd..6354f775bb5 100644
--- a/zerver/lib/home.py
+++ b/zerver/lib/home.py
@@ -177,7 +177,7 @@ def build_page_params_for_home_page_load(
# Adding two_fa_enabled as condition saves us 3 queries when
# 2FA is not enabled.
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 = [
diff --git a/zerver/lib/test_classes.py b/zerver/lib/test_classes.py
index 2eb00e93111..5e511f704af 100644
--- a/zerver/lib/test_classes.py
+++ b/zerver/lib/test_classes.py
@@ -459,10 +459,10 @@ Output:
and not for a logged-out web-public visitor."""
self.assertEqual(result.status_code, 200)
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,
# 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,
**kwargs: Any) -> HttpResponse:
diff --git a/zerver/tests/test_home.py b/zerver/tests/test_home.py
index 6ea4ded7d15..051699a6088 100644
--- a/zerver/tests/test_home.py
+++ b/zerver/tests/test_home.py
@@ -85,7 +85,7 @@ class HomeTest(ZulipTestCase):
"is_admin",
"is_guest",
"is_owner",
- "is_web_public_guest",
+ "is_web_public_visitor",
"jitsi_server_url",
"language_list",
"language_list_dbl_col",