zulip/zerver
Zixuan James Li 06d3f3cf64 2fa: Refactor is_2fa_verified to require type narrowing.
This makes it mandatory to narrow the type of the user to `UserProfile`
before calling this helper.

This effectively removes the `request.user` check. We do not call login_page
anywhere else without getting through the authentication middleware.

Signed-off-by: Zixuan James Li <p359101898@gmail.com>
2022-07-27 14:28:31 -07:00
..
actions streams: Add isinstance check for merge_streams. 2022-07-26 18:00:24 -07:00
data_import user_profile: Fallback to "" for timezone upon creation. 2022-06-28 16:05:24 -07:00
integration_fixtures/nagios tests: Add a test for fixtures for non-webhook integrations. 2021-04-28 08:16:51 -07:00
lib 2fa: Refactor is_2fa_verified to require type narrowing. 2022-07-27 14:28:31 -07:00
management webhook: Fix f-string str-bytes-safe error. 2022-07-26 18:00:24 -07:00
migrations migrations: Define emoji_to_lowercase outside. 2022-07-26 18:00:24 -07:00
openapi openapi: Move endpoint URL to generator. 2022-07-22 16:41:55 -07:00
tests email_error: Improve tests for inbound email edge case. 2022-07-27 13:53:16 -07:00
tornado decorator: Move tornado notify data parameter to REQ framework. 2022-07-20 14:23:05 -07:00
views 2fa: Refactor is_2fa_verified to require type narrowing. 2022-07-27 14:28:31 -07:00
webhooks integrations: Update harbor for new payload format. 2022-07-22 11:44:22 -07:00
worker queue_processor: Fix type annotation for connection. 2022-07-26 18:00:24 -07:00
__init__.py django: Upgrade Zulip to Django 3.2 LTS. 2021-05-03 08:36:22 -07:00
apps.py caching: Make sender type optional for flush_cache. 2021-07-26 14:48:07 -07:00
context_processors.py footer: Reduce links for self-hosted installations on signup pages. 2022-07-22 15:46:42 -07:00
decorator.py 2fa: Refactor is_2fa_verified to require type narrowing. 2022-07-27 14:28:31 -07:00
filters.py typing: Fix function signatures. 2021-08-20 05:54:19 -07:00
forms.py forms: Fix to_python method signature. 2022-07-26 18:00:24 -07:00
logging_handlers.py python: Use Python 3.8 typing.{Protocol,TypedDict}. 2022-04-27 12:57:49 -07:00
middleware.py middleware: Add isinstance check before retrieving content. 2022-07-15 14:00:56 -07:00
models.py models: Move the assertion checking bot_owner_id. 2022-07-26 18:00:24 -07:00
signals.py requirements: Upgrade to Django 4.0. 2022-07-13 16:07:17 -07:00