mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-28 12:34:00 +03:00
Added the user in the request for BasicAuthentication, this allow the use of request.user in the views
This commit is contained in:
parent
b1fca03089
commit
7f46251f7d
|
@ -73,6 +73,7 @@ class BasicAuthentication(BaseAuthentication):
|
|||
|
||||
user = authenticate(username=uname, password=passwd)
|
||||
if user is not None and user.is_active:
|
||||
request.user = user
|
||||
return user
|
||||
return None
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user