mirror of https://github.com/zulip/zulip.git
zerver: Replace uri with url in local variables and comments.
This commit is contained in:
parent
28ce2684bb
commit
a07ebba860
|
@ -67,7 +67,7 @@ def do_change_realm_subdomain(
|
||||||
experience for clients.
|
experience for clients.
|
||||||
"""
|
"""
|
||||||
old_subdomain = realm.subdomain
|
old_subdomain = realm.subdomain
|
||||||
old_uri = realm.url
|
old_url = realm.url
|
||||||
# If the realm had been a demo organization scheduled for
|
# If the realm had been a demo organization scheduled for
|
||||||
# deleting, clear that state.
|
# deleting, clear that state.
|
||||||
realm.demo_organization_scheduled_deletion_date = None
|
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
|
# 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
|
# 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:
|
for placeholder_realm in placeholder_realms:
|
||||||
do_add_deactivated_redirect(placeholder_realm, realm.url)
|
do_add_deactivated_redirect(placeholder_realm, realm.url)
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,7 @@ class ZulipUserFilterQuery(UserFilterQuery):
|
||||||
# attr_map describes which table.column the given SCIM2 User
|
# attr_map describes which table.column the given SCIM2 User
|
||||||
# attributes refer to.
|
# attributes refer to.
|
||||||
attr_map = {
|
attr_map = {
|
||||||
# attr, sub attr, uri
|
# attr, sub attr, url
|
||||||
("userName", None, None): "zerver_userprofile.delivery_email",
|
("userName", None, None): "zerver_userprofile.delivery_email",
|
||||||
# We can only reasonably support filtering by name.formatted
|
# We can only reasonably support filtering by name.formatted
|
||||||
# as UserProfile.full_name is its equivalent. We don't store
|
# as UserProfile.full_name is its equivalent. We don't store
|
||||||
|
|
|
@ -442,7 +442,7 @@ def finish_desktop_flow(
|
||||||
|
|
||||||
def finish_mobile_flow(request: HttpRequest, user_profile: UserProfile, otp: str) -> HttpResponse:
|
def finish_mobile_flow(request: HttpRequest, user_profile: UserProfile, otp: str) -> HttpResponse:
|
||||||
# For the mobile OAuth flow, we send the API key and other
|
# 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)
|
api_key = get_api_key(user_profile)
|
||||||
response = create_response_for_otp_flow(
|
response = create_response_for_otp_flow(
|
||||||
api_key, otp, user_profile, encrypted_key_field_name="otp_encrypted_api_key"
|
api_key, otp, user_profile, encrypted_key_field_name="otp_encrypted_api_key"
|
||||||
|
@ -470,7 +470,7 @@ def create_response_for_otp_flow(
|
||||||
) -> HttpResponse:
|
) -> HttpResponse:
|
||||||
realm_url = user_profile.realm.url
|
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
|
# This block should only apply to the mobile flow, so we if add others, this
|
||||||
# needs to be conditional.
|
# needs to be conditional.
|
||||||
if realm_url in settings.REALM_MOBILE_REMAP_URIS:
|
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:
|
def redirect_and_log_into_subdomain(result: ExternalAuthResult) -> HttpResponse:
|
||||||
token = result.store_data()
|
token = result.store_data()
|
||||||
realm = get_realm(result.data_dict["subdomain"])
|
realm = get_realm(result.data_dict["subdomain"])
|
||||||
subdomain_login_uri = realm.url + reverse(log_into_subdomain, args=[token])
|
subdomain_login_url = realm.url + reverse(log_into_subdomain, args=[token])
|
||||||
return redirect(subdomain_login_uri)
|
return redirect(subdomain_login_url)
|
||||||
|
|
||||||
|
|
||||||
def redirect_to_misconfigured_ldap_notice(request: HttpRequest, error_type: int) -> HttpResponse:
|
def redirect_to_misconfigured_ldap_notice(request: HttpRequest, error_type: int) -> HttpResponse:
|
||||||
|
|
|
@ -83,7 +83,7 @@ def serve_s3(request: HttpRequest, path_id: str, force_download: bool = False) -
|
||||||
return redirect(url)
|
return redirect(url)
|
||||||
|
|
||||||
# We over-escape the path, to work around it being impossible to
|
# 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)
|
parsed_url = urlsplit(url)
|
||||||
assert parsed_url.hostname is not None
|
assert parsed_url.hostname is not None
|
||||||
assert parsed_url.path is not None
|
assert parsed_url.path is not None
|
||||||
|
|
Loading…
Reference in New Issue