You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the order in which this middleware is inserted in respect to AuthenticationMiddleware
and SessionMiddleware does not matter as we use a closure that returns the request-scope only on-demand.
This closure can fail in certain setups (see #1 (comment)) and seems avoidable. Right now nothing speaks against requiring a fixed order where ThreadLocalUserMiddleware is only allowed after the other two.
Currently the order in which this middleware is inserted in respect to
AuthenticationMiddleware
and
SessionMiddleware
does not matter as we use a closure that returns the request-scope only on-demand.This closure can fail in certain setups (see #1 (comment)) and seems avoidable. Right now nothing speaks against requiring a fixed order where
ThreadLocalUserMiddleware
is only allowed after the other two.See: https://github.com/PaesslerAG/django-currentuser/blob/mb-prepare-package/django_currentuser/middleware.py#L29
The text was updated successfully, but these errors were encountered: