panels: Show a banner for users with legacy desktop apps.

Users who are using ZulipDesktop or haven't managed to auto-update to
ZulipElectron should be strongly encouraged to upgrade.

We'll likely want to move to something even stricter that blocks
loading the app at all, but this is a good start.
This commit is contained in:
Tim Abbott
2020-02-28 00:55:29 -08:00
parent 7db3d4560f
commit d79a7a8c35
6 changed files with 40 additions and 1 deletions

View File

@@ -24,6 +24,7 @@ from zerver.lib.streams import access_stream_by_name
from zerver.lib.subdomains import get_subdomain
from zerver.lib.users import compute_show_invites_and_add_streams
from zerver.lib.utils import statsd, generate_random_token
from zerver.views.compatibility import is_outdated_desktop_app
from two_factor.utils import default_device
import calendar
@@ -227,6 +228,7 @@ def home_real(request: HttpRequest) -> HttpResponse:
debug_mode = settings.DEBUG,
test_suite = settings.TEST_SUITE,
poll_timeout = settings.POLL_TIMEOUT,
insecure_desktop_app = is_outdated_desktop_app(request.META["HTTP_USER_AGENT"]),
login_page = settings.HOME_NOT_LOGGED_IN,
root_domain_uri = settings.ROOT_DOMAIN_URI,
max_file_upload_size = settings.MAX_FILE_UPLOAD_SIZE,