Added the user in the request for BasicAuthentication, this allow the use of request.user in the views

This commit is contained in:
Gustavo Andrés Angulo 2012-07-18 20:06:10 -05:00
parent b1fca03089
commit 7f46251f7d

View File

@ -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