zulip/zerver
Zixuan James Li b02779c005 request: Refactor remote_server into RequestNotes.
This eliminates the possibility of having `request.user` as
`RemoteZulipServer` by refactoring it as an attribute of `RequestNotes`.

So we can effectively narrow the type of `request.user` by testing
`user.is_authenticated` in most cases (except that of `SCIMClient`) in
code paths that require access to `.format_requestor_for_logs` where we
previously expect either `UserProfile` or `RemoteZulipServer` backed by
the implied polymorphism.

Signed-off-by: Zixuan James Li <p359101898@gmail.com>
2022-07-28 09:38:40 -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
lib request: Refactor remote_server into RequestNotes. 2022-07-28 09:38:40 -07:00
management webhook: Fix f-string str-bytes-safe error. 2022-07-26 18:00:24 -07:00
migrations migration: Tweak migration 0401 to exit early on most servers. 2022-07-28 09:30:56 -07:00
openapi settings: Fix references to new user and stream announcements. 2022-07-28 09:33:09 -07:00
tests request: Refactor remote_server into RequestNotes. 2022-07-28 09:38:40 -07:00
tornado decorator: Move tornado notify `data` parameter to `REQ` framework. 2022-07-20 14:23:05 -07:00
views decorator: Remove unnecessary flag for process_client. 2022-07-28 09:38:21 -07:00
webhooks integration: Fix integration with newrelic. 2022-07-27 16:15:29 -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 request: Refactor remote_server into RequestNotes. 2022-07-28 09:38:40 -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 request: Refactor remote_server into RequestNotes. 2022-07-28 09:38:40 -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