File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -277,8 +277,11 @@ def user(self, value):
277
277
Sets the user on the current request. This is necessary to maintain
278
278
compatibility with django.contrib.auth where the user property is
279
279
set in the login and logout functions.
280
+
281
+ Sets the user on the wrapped original request as well.
280
282
"""
281
283
self ._user = value
284
+ self ._request .user = value
282
285
283
286
@property
284
287
def auth (self ):
@@ -456,7 +459,7 @@ def _authenticate(self):
456
459
457
460
if user_auth_tuple is not None :
458
461
self ._authenticator = authenticator
459
- self ._user , self ._auth = user_auth_tuple
462
+ self .user , self ._auth = user_auth_tuple
460
463
return
461
464
462
465
self ._not_authenticated ()
@@ -471,9 +474,9 @@ def _not_authenticated(self):
471
474
self ._authenticator = None
472
475
473
476
if api_settings .UNAUTHENTICATED_USER :
474
- self ._user = api_settings .UNAUTHENTICATED_USER ()
477
+ self .user = api_settings .UNAUTHENTICATED_USER ()
475
478
else :
476
- self ._user = None
479
+ self .user = None
477
480
478
481
if api_settings .UNAUTHENTICATED_TOKEN :
479
482
self ._auth = api_settings .UNAUTHENTICATED_TOKEN ()
You can’t perform that action at this time.
0 commit comments