mirror of
https://github.com/zulip/zulip.git
synced 2025-10-26 01:24:02 +00:00
settings: Rename SERVER_URI to ROOT_DOMAIN_URI.
This should be a lot less confusing. See #6013 for discussion.
This commit is contained in:
@@ -92,7 +92,7 @@ function _setup_page() {
|
|||||||
zuliprc: 'zuliprc',
|
zuliprc: 'zuliprc',
|
||||||
flaskbotrc: 'flaskbotrc',
|
flaskbotrc: 'flaskbotrc',
|
||||||
timezones: moment.tz.names(),
|
timezones: moment.tz.names(),
|
||||||
server_uri: page_params.server_uri,
|
root_domain_uri: page_params.root_domain_uri,
|
||||||
});
|
});
|
||||||
|
|
||||||
$(".settings-box").html(settings_tab);
|
$(".settings-box").html(settings_tab);
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<div id="bot-settings" class="settings-section" data-name="your-bots">
|
<div id="bot-settings" class="settings-section" data-name="your-bots">
|
||||||
<div class="bot-settings-form">
|
<div class="bot-settings-form">
|
||||||
<div class="tip">
|
<div class="tip">
|
||||||
{{#tr this}}Looking for our <a href="/integrations" target="_blank">Integrations</a> or <a href="__server_uri__/api" target="_blank">API</a> documentation?{{/tr}}
|
{{#tr this}}Looking for our <a href="/integrations" target="_blank">Integrations</a> or <a href="__root_domain_uri__/api" target="_blank">API</a> documentation?{{/tr}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ the registration flow has its own (nearly identical) copy of the fields below in
|
|||||||
#}
|
#}
|
||||||
<input id="id_terms" class="required" type="checkbox" name="terms"
|
<input id="id_terms" class="required" type="checkbox" name="terms"
|
||||||
{% if form.terms.value() %}checked="checked"{% endif %} />
|
{% if form.terms.value() %}checked="checked"{% endif %} />
|
||||||
{% trans %}I agree to the <a href="{{ server_uri }}/terms">Terms of Service</a>.{% endtrans %}
|
{% trans %}I agree to the <a href="{{ root_domain_uri }}/terms">Terms of Service</a>.{% endtrans %}
|
||||||
</label>
|
</label>
|
||||||
{% if form.terms.errors %}
|
{% if form.terms.errors %}
|
||||||
{% for error in form.terms.errors %}
|
{% for error in form.terms.errors %}
|
||||||
|
|||||||
@@ -28,11 +28,11 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if google_error %}
|
{% if google_error %}
|
||||||
{{ render_markdown_path('zerver/google-error.md', {"server_uri": server_uri, "settings_path": settings_path, "secrets_path": secrets_path}) }}
|
{{ render_markdown_path('zerver/google-error.md', {"root_domain_uri": root_domain_uri, "settings_path": settings_path, "secrets_path": secrets_path}) }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if github_error %}
|
{% if github_error %}
|
||||||
{{ render_markdown_path('zerver/github-error.md', {"server_uri": server_uri, "settings_path": settings_path, "secrets_path": secrets_path}) }}
|
{{ render_markdown_path('zerver/github-error.md', {"root_domain_uri": root_domain_uri, "settings_path": settings_path, "secrets_path": secrets_path}) }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<p>After making your changes, remember to restart
|
<p>After making your changes, remember to restart
|
||||||
|
|||||||
@@ -26,10 +26,10 @@
|
|||||||
<ul>
|
<ul>
|
||||||
{% if find_team_link_disabled %}
|
{% if find_team_link_disabled %}
|
||||||
{% else %}
|
{% else %}
|
||||||
<li><a href="{{ server_uri }}/find_my_team/">{{ _("Find account") }}</a></li>
|
<li><a href="{{ root_domain_uri }}/find_my_team/">{{ _("Find account") }}</a></li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if open_realm_creation %}
|
{% if open_realm_creation %}
|
||||||
<li><a href="{{ server_uri }}/create_realm/">{{ _("New organization") }}</a></li>
|
<li><a href="{{ root_domain_uri }}/create_realm/">{{ _("New organization") }}</a></li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if login_link_disabled %}
|
{% if login_link_disabled %}
|
||||||
{% else %}
|
{% else %}
|
||||||
@@ -40,8 +40,8 @@
|
|||||||
{% else %}
|
{% else %}
|
||||||
<li><a href="{{ url('register') }}">{{ _("Register") }}</a></li>
|
<li><a href="{{ url('register') }}">{{ _("Register") }}</a></li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<li><a href="{{ server_uri }}/terms/">{{ _("Terms of service") }}</a></li>
|
<li><a href="{{ root_domain_uri }}/terms/">{{ _("Terms of service") }}</a></li>
|
||||||
<li><a href="{{ server_uri }}/privacy/">{{ _("Privacy policy") }}</a></li>
|
<li><a href="{{ root_domain_uri }}/privacy/">{{ _("Privacy policy") }}</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</section>
|
</section>
|
||||||
<section>
|
<section>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
You are using the **GitHub auth backend**, but it is not properly
|
You are using the **GitHub auth backend**, but it is not properly
|
||||||
configured. Please check the following:
|
configured. Please check the following:
|
||||||
|
|
||||||
You have added `{{ server_uri }}/complete/github/` as the callback URL
|
You have added `{{ root_domain_uri }}/complete/github/` as the callback URL
|
||||||
in the OAuth application in GitHub. You can create OAuth apps from
|
in the OAuth application in GitHub. You can create OAuth apps from
|
||||||
[GitHub's developer site](https://github.com/settings/developers).
|
[GitHub's developer site](https://github.com/settings/developers).
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ configured. Please check the following:
|
|||||||
You can create OAuth2 apps at [the Google developer console](https://console.developers.google.com).
|
You can create OAuth2 apps at [the Google developer console](https://console.developers.google.com).
|
||||||
|
|
||||||
* You have configured your OAuth2 client to allow redirects to your
|
* You have configured your OAuth2 client to allow redirects to your
|
||||||
server's Google auth URL: `{{ server_uri }}/accounts/login/google/done/`.
|
server's Google auth URL: `{{ root_domain_uri }}/accounts/login/google/done/`.
|
||||||
|
|
||||||
* You have set `GOOGLE_OAUTH2_CLIENT_ID` in `{{ settings_path }}` and
|
* You have set `GOOGLE_OAUTH2_CLIENT_ID` in `{{ settings_path }}` and
|
||||||
`google_oauth2_client_secret` in `{{ secrets_path }}`.
|
`google_oauth2_client_secret` in `{{ secrets_path }}`.
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<nav class="{{className}}">
|
<nav class="{{className}}">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<a class="brand logo no-style" href="{{ server_uri }}">
|
<a class="brand logo no-style" href="{{ root_domain_uri }}">
|
||||||
<svg class="brand-logo" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 40 40" version="1.1">
|
<svg class="brand-logo" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 40 40" version="1.1">
|
||||||
<g transform="translate(-297.14285,-466.64792)">
|
<g transform="translate(-297.14285,-466.64792)">
|
||||||
<circle cx="317.14285" cy="486.64792" r="19.030317" style="fill:#fff;stroke-width:1.93936479;stroke:transparent"></circle>
|
<circle cx="317.14285" cy="486.64792" r="19.030317" style="fill:#fff;stroke-width:1.93936479;stroke:transparent"></circle>
|
||||||
|
|||||||
@@ -3,9 +3,9 @@
|
|||||||
<div class="column-left">
|
<div class="column-left">
|
||||||
<div>
|
<div>
|
||||||
{% if custom_logo_url %}
|
{% if custom_logo_url %}
|
||||||
<a class="brand logo" href="{{ server_uri }}/"><img draggable="false" src="{{ custom_logo_url }}" class="portico-logo" alt="{{ _('Zulip') }}" content="Zulip" /></a>
|
<a class="brand logo" href="{{ root_domain_uri }}/"><img draggable="false" src="{{ custom_logo_url }}" class="portico-logo" alt="{{ _('Zulip') }}" content="Zulip" /></a>
|
||||||
{% else %}
|
{% else %}
|
||||||
<a class="brand logo" href="{{ server_uri }}{% if page_is_help_center %}/help/{% endif %}">
|
<a class="brand logo" href="{{ root_domain_uri }}{% if page_is_help_center %}/help/{% endif %}">
|
||||||
<svg class="brand-logo" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 40 40" version="1.1">
|
<svg class="brand-logo" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 40 40" version="1.1">
|
||||||
<g transform="translate(-297.14285,-466.64792)">
|
<g transform="translate(-297.14285,-466.64792)">
|
||||||
<circle cx="317.14285" cy="486.64792" r="19.030317" style="fill:#fff;stroke-width:1.93936479;stroke:transparent"></circle>
|
<circle cx="317.14285" cy="486.64792" r="19.030317" style="fill:#fff;stroke-width:1.93936479;stroke:transparent"></circle>
|
||||||
|
|||||||
@@ -148,7 +148,7 @@ Form is validated both client-side using jquery-validate (see signup.js) and ser
|
|||||||
<input id="id_terms" class="required" type="checkbox" name="terms"
|
<input id="id_terms" class="required" type="checkbox" name="terms"
|
||||||
{% if form.terms.value() %}checked="checked"{% endif %} />
|
{% if form.terms.value() %}checked="checked"{% endif %} />
|
||||||
<label for="id_terms" class="inline-block">
|
<label for="id_terms" class="inline-block">
|
||||||
{% trans %}I agree to the <a href="{{ server_uri }}/terms" target="_blank">Terms of Service</a>.{% endtrans %}
|
{% trans %}I agree to the <a href="{{ root_domain_uri }}/terms" target="_blank">Terms of Service</a>.{% endtrans %}
|
||||||
</label>
|
</label>
|
||||||
{% if form.terms.errors %}
|
{% if form.terms.errors %}
|
||||||
{% for error in form.terms.errors %}
|
{% for error in form.terms.errors %}
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ IGNORED_PHRASES = [
|
|||||||
'<a href="/#streams">Streams page</a>.'),
|
'<a href="/#streams">Streams page</a>.'),
|
||||||
(r'Looking for our '
|
(r'Looking for our '
|
||||||
'<a href="/integrations" target="_blank">Integrations</a> or '
|
'<a href="/integrations" target="_blank">Integrations</a> or '
|
||||||
'<a href="{{ server_uri }}/api" target="_blank">API</a> '
|
'<a href="{{ root_domain_uri }}/api" target="_blank">API</a> '
|
||||||
'documentation?'),
|
'documentation?'),
|
||||||
r'Most stream administration is done on the <a href="/#streams">Streams page</a>.',
|
r'Most stream administration is done on the <a href="/#streams">Streams page</a>.',
|
||||||
r"one or more people...",
|
r"one or more people...",
|
||||||
|
|||||||
@@ -134,7 +134,7 @@ class CheckCapitalizationTestCase(TestCase):
|
|||||||
"Not ignored phrase",
|
"Not ignored phrase",
|
||||||
('<p class="bot-settings-note padded-container"> Looking for our '
|
('<p class="bot-settings-note padded-container"> Looking for our '
|
||||||
'<a href="/integrations" target="_blank">Integrations</a> or '
|
'<a href="/integrations" target="_blank">Integrations</a> or '
|
||||||
'<a href="{{ server_uri }}/api" target="_blank">API</a> '
|
'<a href="{{ root_domain_uri }}/api" target="_blank">API</a> '
|
||||||
'documentation? </p>'),
|
'documentation? </p>'),
|
||||||
]
|
]
|
||||||
errored, ignored = check_capitalization(strings)
|
errored, ignored = check_capitalization(strings)
|
||||||
@@ -148,6 +148,6 @@ class CheckCapitalizationTestCase(TestCase):
|
|||||||
"Some number 25MiB",
|
"Some number 25MiB",
|
||||||
('<p class="bot-settings-note padded-container"> Looking '
|
('<p class="bot-settings-note padded-container"> Looking '
|
||||||
'for our <a href="/integrations" target="_blank">'
|
'for our <a href="/integrations" target="_blank">'
|
||||||
'Integrations</a> or <a href="{{ server_uri }}/api" '
|
'Integrations</a> or <a href="{{ root_domain_uri }}/api" '
|
||||||
'target="_blank">API</a> documentation? </p>'),
|
'target="_blank">API</a> documentation? </p>'),
|
||||||
]))
|
]))
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ def common_context(user):
|
|||||||
"""
|
"""
|
||||||
return {
|
return {
|
||||||
'realm_uri': user.realm.uri,
|
'realm_uri': user.realm.uri,
|
||||||
'server_uri': settings.SERVER_URI,
|
'root_domain_uri': settings.ROOT_DOMAIN_URI,
|
||||||
'external_uri_scheme': settings.EXTERNAL_URI_SCHEME,
|
'external_uri_scheme': settings.EXTERNAL_URI_SCHEME,
|
||||||
'external_host': settings.EXTERNAL_HOST,
|
'external_host': settings.EXTERNAL_HOST,
|
||||||
}
|
}
|
||||||
@@ -57,7 +57,7 @@ def zulip_default_context(request):
|
|||||||
realm = get_realm_from_request(request)
|
realm = get_realm_from_request(request)
|
||||||
|
|
||||||
if realm is None:
|
if realm is None:
|
||||||
realm_uri = settings.SERVER_URI
|
realm_uri = settings.ROOT_DOMAIN_URI
|
||||||
realm_name = None
|
realm_name = None
|
||||||
realm_icon = None
|
realm_icon = None
|
||||||
realm_description = None
|
realm_description = None
|
||||||
@@ -118,7 +118,7 @@ def zulip_default_context(request):
|
|||||||
'realm_name': realm_name,
|
'realm_name': realm_name,
|
||||||
'realm_icon': realm_icon,
|
'realm_icon': realm_icon,
|
||||||
'realm_description': realm_description,
|
'realm_description': realm_description,
|
||||||
'server_uri': settings.SERVER_URI,
|
'root_domain_uri': settings.ROOT_DOMAIN_URI,
|
||||||
'api_site_required': settings.EXTERNAL_API_PATH != "api.zulip.com",
|
'api_site_required': settings.EXTERNAL_API_PATH != "api.zulip.com",
|
||||||
'email_gateway_example': settings.EMAIL_GATEWAY_EXAMPLE,
|
'email_gateway_example': settings.EMAIL_GATEWAY_EXAMPLE,
|
||||||
'apps_page_url': apps_page_url,
|
'apps_page_url': apps_page_url,
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ def build_email(template_prefix, to_user_id=None, to_email=None, from_name=None,
|
|||||||
'realm_name_in_notifications': False,
|
'realm_name_in_notifications': False,
|
||||||
'support_email': FromAddress.SUPPORT,
|
'support_email': FromAddress.SUPPORT,
|
||||||
'verbose_support_offers': settings.VERBOSE_SUPPORT_OFFERS,
|
'verbose_support_offers': settings.VERBOSE_SUPPORT_OFFERS,
|
||||||
'email_images_base_uri': settings.SERVER_URI + '/static/images/emails/',
|
'email_images_base_uri': settings.ROOT_DOMAIN_URI + '/static/images/emails/',
|
||||||
})
|
})
|
||||||
subject = loader.render_to_string(template_prefix + '.subject',
|
subject = loader.render_to_string(template_prefix + '.subject',
|
||||||
context=context,
|
context=context,
|
||||||
|
|||||||
@@ -252,7 +252,7 @@ class Realm(ModelReprMixin, models.Model):
|
|||||||
if self.subdomain not in [None, ""]:
|
if self.subdomain not in [None, ""]:
|
||||||
return '%s%s.%s' % (settings.EXTERNAL_URI_SCHEME,
|
return '%s%s.%s' % (settings.EXTERNAL_URI_SCHEME,
|
||||||
self.subdomain, settings.EXTERNAL_HOST)
|
self.subdomain, settings.EXTERNAL_HOST)
|
||||||
return settings.SERVER_URI
|
return settings.ROOT_DOMAIN_URI
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def host(self):
|
def host(self):
|
||||||
|
|||||||
@@ -135,11 +135,11 @@ class HomeTest(ZulipTestCase):
|
|||||||
"realm_uri",
|
"realm_uri",
|
||||||
"realm_users",
|
"realm_users",
|
||||||
"realm_waiting_period_threshold",
|
"realm_waiting_period_threshold",
|
||||||
|
"root_domain_uri",
|
||||||
"save_stacktraces",
|
"save_stacktraces",
|
||||||
"server_generation",
|
"server_generation",
|
||||||
"server_inline_image_preview",
|
"server_inline_image_preview",
|
||||||
"server_inline_url_embed_preview",
|
"server_inline_url_embed_preview",
|
||||||
"server_uri",
|
|
||||||
"subscriptions",
|
"subscriptions",
|
||||||
"test_suite",
|
"test_suite",
|
||||||
"timezone",
|
"timezone",
|
||||||
|
|||||||
@@ -172,7 +172,7 @@ def home_real(request):
|
|||||||
test_suite = settings.TEST_SUITE,
|
test_suite = settings.TEST_SUITE,
|
||||||
poll_timeout = settings.POLL_TIMEOUT,
|
poll_timeout = settings.POLL_TIMEOUT,
|
||||||
login_page = settings.HOME_NOT_LOGGED_IN,
|
login_page = settings.HOME_NOT_LOGGED_IN,
|
||||||
server_uri = settings.SERVER_URI,
|
root_domain_uri = settings.ROOT_DOMAIN_URI,
|
||||||
maxfilesize = settings.MAX_FILE_UPLOAD_SIZE,
|
maxfilesize = settings.MAX_FILE_UPLOAD_SIZE,
|
||||||
max_avatar_file_size = settings.MAX_AVATAR_FILE_SIZE,
|
max_avatar_file_size = settings.MAX_AVATAR_FILE_SIZE,
|
||||||
server_generation = settings.SERVER_GENERATION,
|
server_generation = settings.SERVER_GENERATION,
|
||||||
|
|||||||
@@ -50,13 +50,13 @@ def email_page(request):
|
|||||||
'referrer_email': 'runner@acme.com',
|
'referrer_email': 'runner@acme.com',
|
||||||
'referrer_realm_name': 'Acme Corporation',
|
'referrer_realm_name': 'Acme Corporation',
|
||||||
'realm_uri': realm.uri,
|
'realm_uri': realm.uri,
|
||||||
'server_uri': settings.SERVER_URI,
|
'root_domain_uri': settings.ROOT_DOMAIN_URI,
|
||||||
'old_email': 'old_address@acme.com',
|
'old_email': 'old_address@acme.com',
|
||||||
'new_email': 'new_address@acme.com',
|
'new_email': 'new_address@acme.com',
|
||||||
'is_realm_admin': True,
|
'is_realm_admin': True,
|
||||||
'activate_url': '%s/accounts/do_confirm/5348720e4af7d2e8f296cbbd04d439489917ddc0' % (settings.SERVER_URI,),
|
'activate_url': '%s/accounts/do_confirm/5348720e4af7d2e8f296cbbd04d439489917ddc0' % (settings.ROOT_DOMAIN_URI,),
|
||||||
'unsubscribe_link': '%s/accounts/unsubscribe/<type>/cf88931365ef1b0f12eae8d488bbc7af3563d7f0' % (settings.SERVER_URI,),
|
'unsubscribe_link': '%s/accounts/unsubscribe/<type>/cf88931365ef1b0f12eae8d488bbc7af3563d7f0' % (settings.ROOT_DOMAIN_URI,),
|
||||||
'organization_setup_advice_link': '%s/help/getting-your-organization-started-with-zulip' % (settings.SERVER_URI,),
|
'organization_setup_advice_link': '%s/help/getting-your-organization-started-with-zulip' % (settings.ROOT_DOMAIN_URI,),
|
||||||
}
|
}
|
||||||
|
|
||||||
templates = [
|
templates = [
|
||||||
|
|||||||
@@ -539,7 +539,7 @@ else:
|
|||||||
if "EXTERNAL_API_PATH" not in vars():
|
if "EXTERNAL_API_PATH" not in vars():
|
||||||
EXTERNAL_API_PATH = EXTERNAL_HOST + "/api"
|
EXTERNAL_API_PATH = EXTERNAL_HOST + "/api"
|
||||||
EXTERNAL_API_URI = EXTERNAL_URI_SCHEME + EXTERNAL_API_PATH
|
EXTERNAL_API_URI = EXTERNAL_URI_SCHEME + EXTERNAL_API_PATH
|
||||||
SERVER_URI = EXTERNAL_URI_SCHEME + EXTERNAL_HOST
|
ROOT_DOMAIN_URI = EXTERNAL_URI_SCHEME + EXTERNAL_HOST
|
||||||
|
|
||||||
if "NAGIOS_BOT_HOST" not in vars():
|
if "NAGIOS_BOT_HOST" not in vars():
|
||||||
NAGIOS_BOT_HOST = EXTERNAL_HOST
|
NAGIOS_BOT_HOST = EXTERNAL_HOST
|
||||||
|
|||||||
Reference in New Issue
Block a user