portico: Fix apps page webapp link being useless.

The /apps page webapp link now takes the user to /accounts/go to find
their organization's login page, rather than failing to do anything.

Fixes #14977.
This commit is contained in:
sahil9001 2020-05-27 01:57:48 +05:30 committed by Tim Abbott
parent 3c7c163d7f
commit 94dfe4bed3
2 changed files with 4 additions and 1 deletions

View File

@ -177,7 +177,7 @@
<div class="platform-icons">
<div class="group">
<h2>Web</h2>
<a href="{{ apps_page_url }}">
<a href="{{ apps_page_web }}">
<i class="fa fa-desktop platform-icon" aria-hidden="true"></i>
</a>
</div>

View File

@ -86,6 +86,8 @@ def zulip_default_context(request: HttpRequest) -> Dict[str, Any]:
if settings.ZILENCER_ENABLED:
apps_page_url = '/apps/'
apps_page_web = settings.ROOT_DOMAIN_URI + '/accounts/go/'
user_is_authenticated = False
if hasattr(request, 'user') and hasattr(request.user, 'is_authenticated'):
user_is_authenticated = request.user.is_authenticated
@ -120,6 +122,7 @@ def zulip_default_context(request: HttpRequest) -> Dict[str, Any]:
'realm_icon': realm_icon,
'root_domain_uri': settings.ROOT_DOMAIN_URI,
'apps_page_url': apps_page_url,
'apps_page_web': apps_page_web,
'open_realm_creation': settings.OPEN_REALM_CREATION,
'development_environment': settings.DEVELOPMENT,
'support_email': FromAddress.SUPPORT,