mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 22:13:26 +00:00
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>
16 KiB
16 KiB