summaryrefslogtreecommitdiff
path: root/coip/middleware.py
diff options
context:
space:
mode:
authorLeif Johansson <leifj@sunet.se>2010-12-13 12:19:54 +0100
committerLeif Johansson <leifj@sunet.se>2010-12-13 12:19:54 +0100
commit3f832457d24e7f90478ddcd641744980478c7ba6 (patch)
tree20fbde8cc9ef6b1661ef9c2f9942d2e5bf4e1b9b /coip/middleware.py
parent8095ac1496f1d555260ea7e279648d3c48451492 (diff)
middleware for mapping users
Diffstat (limited to 'coip/middleware.py')
-rw-r--r--coip/middleware.py3
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]