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.

portico: Replace "Find accounts" link with "Log in".

Aman Agrawal9f71f4578ba3
diff --git a/templates/zerver/footer.html b/templates/zerver/footer.html
index 21a8e678b57..f118bb13183 100644
--- a/templates/zerver/footer.html
+++ b/templates/zerver/footer.html
@@ -15,6 +15,7 @@
<li class="extra_margin"><a href="/apps/">{{ _("Desktop & mobile apps") }}</a></li>
<li><a href="/new/">{{ _("New organization") }}</a></li>
<li><a href="/accounts/go/">{{ _("Log in") }}</a></li>
+ <li><a href="/accounts/find/">{{ _("Find accounts") }}</a></li>
</ul>
</div>
<div class="footer__section">
diff --git a/templates/zerver/landing_nav.html b/templates/zerver/landing_nav.html
index aa07814f4db..fac54573dbd 100644
--- a/templates/zerver/landing_nav.html
+++ b/templates/zerver/landing_nav.html
@@ -166,19 +166,12 @@
</div>
</div>
{% else %}
- {% if login_link_disabled %}
- {% else %}
<a class='top-menu-item' href="/login/">Log in</a>
- {% endif %}
{% if register_link_disabled %}
{% else %}
<a class='top-menu-item' href="/register/">Sign up</a>
{% endif %}
{% endif %}
- {% if find_team_link_disabled %}
- {% else %}
- <a class='top-menu-item' href="/accounts/find/">Find accounts</a>
- {% endif %}
</div>
</div>
<input type="radio" name="top-menu-tabs" class="top-menu-tab-input-unselect" id="top-menu-tab-close" checked />
@@ -321,19 +314,12 @@
</div>
</details>
{% else %}
- {% if login_link_disabled %}
- {% else %}
<div class='top-menu-mobile-item'><a href="/login/">Log in</a></div>
- {% endif %}
{% if register_link_disabled %}
{% else %}
<div class='top-menu-mobile-item'><a href="/register/">Sign up</a></div>
{% endif %}
{% endif %}
- {% if find_team_link_disabled %}
- {% else %}
- <div class='top-menu-mobile-item'><a href="/accounts/find/">Find accounts</a></div>
- {% endif %}
</div>
</details>
{% endif %}
diff --git a/templates/zerver/portico-header.html b/templates/zerver/portico-header.html
index 0709e6ebe09..f97f1c88308 100644
--- a/templates/zerver/portico-header.html
+++ b/templates/zerver/portico-header.html
@@ -34,8 +34,7 @@
{% if user_is_authenticated %}
{% include 'zerver/portico-header-dropdown.html' %}
{% else %}
- {% if login_link_disabled %}
- {% elif not only_sso %}
+ {% if not only_sso %}
<a href="{{login_url}}">{{ _('Log in') }}</a>
{% endif %}
{% endif %}
@@ -50,8 +49,7 @@
{% endif %}
{% endif %}
- {% if not is_self_hosting_management_page and not find_team_link_disabled %}
- <a class= "find-accounts-link" href="{{ root_domain_url }}/accounts/find/">{{ _('Find accounts') }}</a>
+ {% if not is_self_hosting_management_page and non_realm_specific_page %}
<a href="{{ root_domain_url }}/new/">{{ _('New organization') }}</a>
{% endif %}
</div>
diff --git a/zerver/context_processors.py b/zerver/context_processors.py
index 41a81b69591..fe430c8c4cd 100644
--- a/zerver/context_processors.py
+++ b/zerver/context_processors.py
@@ -130,23 +130,20 @@ def zulip_default_context(request: HttpRequest) -> dict[str, Any]:
skip_footer = False
register_link_disabled = settings.REGISTER_LINK_DISABLED
- login_link_disabled = settings.LOGIN_LINK_DISABLED
- find_team_link_disabled = settings.FIND_TEAM_LINK_DISABLED
allow_search_engine_indexing = False
+ non_realm_specific_page = False
if (
settings.ROOT_DOMAIN_LANDING_PAGE
and get_subdomain(request) == Realm.SUBDOMAIN_FOR_ROOT_DOMAIN
):
register_link_disabled = True
- login_link_disabled = True
- find_team_link_disabled = False
allow_search_engine_indexing = True
+ non_realm_specific_page = True
elif realm is None:
register_link_disabled = True
- login_link_disabled = True
- find_team_link_disabled = False
skip_footer = True
+ non_realm_specific_page = True
apps_page_web = settings.ROOT_DOMAIN_URI + "/accounts/go/"
@@ -177,7 +174,6 @@ def zulip_default_context(request: HttpRequest) -> dict[str, Any]:
"root_domain_landing_page": settings.ROOT_DOMAIN_LANDING_PAGE,
"custom_logo_url": settings.CUSTOM_LOGO_URL,
"register_link_disabled": register_link_disabled,
- "login_link_disabled": login_link_disabled,
"terms_of_service": settings.TERMS_OF_SERVICE_VERSION is not None,
"login_url": settings.HOME_NOT_LOGGED_IN,
"only_sso": settings.ONLY_SSO,
@@ -193,7 +189,6 @@ def zulip_default_context(request: HttpRequest) -> dict[str, Any]:
"development_environment": settings.DEVELOPMENT,
"support_email": support_email,
"support_email_html_tag": support_email_html_tag,
- "find_team_link_disabled": find_team_link_disabled,
"password_min_length": settings.PASSWORD_MIN_LENGTH,
"password_max_length": settings.PASSWORD_MAX_LENGTH,
"password_min_guesses": settings.PASSWORD_MIN_GUESSES,
@@ -209,6 +204,7 @@ def zulip_default_context(request: HttpRequest) -> dict[str, Any]:
"skip_footer": skip_footer,
"default_page_params": default_page_params,
"corporate_enabled": corporate_enabled,
+ "non_realm_specific_page": non_realm_specific_page,
}
if settings.SENTRY_FRONTEND_DSN is not None:
diff --git a/zproject/default_settings.py b/zproject/default_settings.py
index 4e59d2adcf5..09fe87ab232 100644
--- a/zproject/default_settings.py
+++ b/zproject/default_settings.py
@@ -477,8 +477,6 @@ INVITES_NEW_REALM_DAYS = 7
# Controls for which links are published in portico footers/headers/etc.
REGISTER_LINK_DISABLED: bool | None = None
-LOGIN_LINK_DISABLED = False
-FIND_TEAM_LINK_DISABLED = True
# What domains to treat like the root domain
ROOT_SUBDOMAIN_ALIASES = ["www"]