diff options
author | Leif Johansson <leifj@sunet.se> | 2010-12-13 12:19:54 +0100 |
---|---|---|
committer | Leif Johansson <leifj@sunet.se> | 2010-12-13 12:19:54 +0100 |
commit | 3f832457d24e7f90478ddcd641744980478c7ba6 (patch) | |
tree | 20fbde8cc9ef6b1661ef9c2f9942d2e5bf4e1b9b /coip/middleware.py | |
parent | 8095ac1496f1d555260ea7e279648d3c48451492 (diff) |
middleware for mapping users
Diffstat (limited to 'coip/middleware.py')
-rw-r--r-- | coip/middleware.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/coip/middleware.py b/coip/middleware.py index b4af835..d1ca1f6 100644 --- a/coip/middleware.py +++ b/coip/middleware.py @@ -5,6 +5,8 @@ Created on Dec 13, 2010 ''' from django.core.exceptions import ImproperlyConfigured from coip.apps.userprofile.models import UserProfile +import logging +from pprint import pformat class UserMappingMiddleware(object): ''' @@ -16,6 +18,7 @@ class UserMappingMiddleware(object): raise ImproperlyConfigured("Place before RemoteUserMiddleware") username = request.META['REMOTE_USER'] + logging.warn(pformat(request.META)) qs = UserProfile.objects.filter(user__username=username,primary=True) if qs: profile = qs[0] |