Make sync login() and logout() set request.auser if present
Analogous to #37017, we should make sync logout() clear request.auser if present. If auser is not present, I doubt login() should set it, but if it is present, it probably should be set as well.
Change History
(7)
| Owner: |
set to Vishy
|
| Status: |
new → assigned
|
| Triage Stage: |
Unreviewed → Accepted
|
| Patch needs improvement: |
set
|
| Patch needs improvement: |
unset
|
| Triage Stage: |
Accepted → Ready for checkin
|
| Resolution: |
→ fixed
|
| Status: |
assigned → closed
|
Regression tests from the PR discussion if useful
tests/auth_tests/test_middleware.py
I personally think auser may need to be set as using
sync_to_asyncshould still be valid and perhaps third-party code may have sync only code assuming things will work usingsync_to_async. I understand in your own project you should usealogininstead