aboutsummaryrefslogtreecommitdiffstats
path: root/djangorestframework/authenticators.py
diff options
context:
space:
mode:
authortom christie tom@tomchristie.com2011-02-01 21:05:49 +0000
committertom christie tom@tomchristie.com2011-02-01 21:05:49 +0000
commite19816598973cb40b2d331d61c399ed90c81f430 (patch)
treeb2076e4009660b435125eb80da2f22ab00b9d615 /djangorestframework/authenticators.py
parent0c6f682cd0e03c06298cec78e79d10a87426fca8 (diff)
downloaddjango-rest-framework-e19816598973cb40b2d331d61c399ed90c81f430.tar.bz2
Tests for MSIE accept header munging
Diffstat (limited to 'djangorestframework/authenticators.py')
-rw-r--r--djangorestframework/authenticators.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/djangorestframework/authenticators.py b/djangorestframework/authenticators.py
index 8de182de..24addb22 100644
--- a/djangorestframework/authenticators.py
+++ b/djangorestframework/authenticators.py
@@ -38,7 +38,7 @@ class BasicAuthenticator(BaseAuthenticator):
class UserLoggedInAuthenticator(BaseAuthenticator):
"""Use Djagno's built-in request session for authentication."""
def authenticate(self, request):
- if request.user and request.user.is_active:
+ if getattr(request, 'user', None) and request.user.is_active:
return request.user
return None