mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-04-13 09:42:01 +00:00
Adding monkey patch explanation.
This commit is contained in:
parent
cc50e3ce10
commit
ba8c4c6bfc
1 changed files with 7 additions and 0 deletions
|
@ -770,6 +770,13 @@ def monkey_patched_get_user(request):
|
|||
"""
|
||||
Return the user model instance associated with the given request session.
|
||||
If no user is retrieved, return an instance of `AnonymousUser`.
|
||||
|
||||
Monkey patched for the django 2.0 upgrade because session authenticated,
|
||||
added in 1.7 and required in 1.10, invalidates all existing 1.5 session auth
|
||||
tokens. These tokens need to be refreshed as users login over the year, so
|
||||
until then, leave this moneky patch running until we're ready to invalidate
|
||||
any user who hasn't logged in during the window between the django 2.0 launch
|
||||
and when this monkey patch is removed.
|
||||
"""
|
||||
from django.contrib.auth.models import AnonymousUser
|
||||
user = None
|
||||
|
|
Loading…
Add table
Reference in a new issue