zerver: Replace uri with url in local variables and comments.

This commit is contained in:
Vector73 2024-06-09 09:31:03 +05:30 committed by Tim Abbott
parent 28ce2684bb
commit a07ebba860
4 changed files with 8 additions and 8 deletions

View File

@ -67,7 +67,7 @@ def do_change_realm_subdomain(
experience for clients.
"""
old_subdomain = realm.subdomain
old_uri = realm.url
old_url = realm.url
# If the realm had been a demo organization scheduled for
# deleting, clear that state.
realm.demo_organization_scheduled_deletion_date = None
@ -84,7 +84,7 @@ def do_change_realm_subdomain(
# If a realm if being renamed multiple times, we should find all the placeholder
# realms and reset their deactivated_redirect field to point to the new realm url
placeholder_realms = Realm.objects.filter(deactivated_redirect=old_uri, deactivated=True)
placeholder_realms = Realm.objects.filter(deactivated_redirect=old_url, deactivated=True)
for placeholder_realm in placeholder_realms:
do_add_deactivated_redirect(placeholder_realm, realm.url)

View File

@ -26,7 +26,7 @@ class ZulipUserFilterQuery(UserFilterQuery):
# attr_map describes which table.column the given SCIM2 User
# attributes refer to.
attr_map = {
# attr, sub attr, uri
# attr, sub attr, url
("userName", None, None): "zerver_userprofile.delivery_email",
# We can only reasonably support filtering by name.formatted
# as UserProfile.full_name is its equivalent. We don't store

View File

@ -442,7 +442,7 @@ def finish_desktop_flow(
def finish_mobile_flow(request: HttpRequest, user_profile: UserProfile, otp: str) -> HttpResponse:
# For the mobile OAuth flow, we send the API key and other
# necessary details in a redirect to a zulip:// URI scheme.
# necessary details in a redirect to a zulip:// URL scheme.
api_key = get_api_key(user_profile)
response = create_response_for_otp_flow(
api_key, otp, user_profile, encrypted_key_field_name="otp_encrypted_api_key"
@ -470,7 +470,7 @@ def create_response_for_otp_flow(
) -> HttpResponse:
realm_url = user_profile.realm.url
# Check if the mobile URI is overridden in settings, if so, replace it
# Check if the mobile URL is overridden in settings, if so, replace it
# This block should only apply to the mobile flow, so we if add others, this
# needs to be conditional.
if realm_url in settings.REALM_MOBILE_REMAP_URIS:
@ -755,8 +755,8 @@ def log_into_subdomain(request: HttpRequest, token: str) -> HttpResponse:
def redirect_and_log_into_subdomain(result: ExternalAuthResult) -> HttpResponse:
token = result.store_data()
realm = get_realm(result.data_dict["subdomain"])
subdomain_login_uri = realm.url + reverse(log_into_subdomain, args=[token])
return redirect(subdomain_login_uri)
subdomain_login_url = realm.url + reverse(log_into_subdomain, args=[token])
return redirect(subdomain_login_url)
def redirect_to_misconfigured_ldap_notice(request: HttpRequest, error_type: int) -> HttpResponse:

View File

@ -83,7 +83,7 @@ def serve_s3(request: HttpRequest, path_id: str, force_download: bool = False) -
return redirect(url)
# We over-escape the path, to work around it being impossible to
# get the _unescaped_ new internal request URI in nginx.
# get the _unescaped_ new internal request URL in nginx.
parsed_url = urlsplit(url)
assert parsed_url.hostname is not None
assert parsed_url.path is not None