zsoldosp / django-currentuser

Conveniently store reference to request user on thread/db level.
BSD 3-Clause "New" or "Revised" License
157 stars 40 forks source link

Unset current user after request is processed #49

Closed vokracko closed 2 years ago

vokracko commented 3 years ago

Problem

When using get_current_authenticated_user outside of request context (middleware not applied) the thread variable still contains instance of a last user that performed request (which might not exist anymore)

Occurences

  1. In tests
  2. In commands

Related issues

vokracko commented 2 years ago

@daviddavis @Paessler @belugame WDYT?

belugame commented 2 years ago

The tests fail, that should be fixed before merging

vokracko commented 2 years ago

superseded by https://github.com/PaesslerAG/django-currentuser/pull/61