Template updates, now includes middleware to detect the IGB

This commit is contained in:
Dreddit Web User
2011-01-17 12:06:31 +00:00
parent 11b8b2e07a
commit 943b4cb4e1
3 changed files with 32 additions and 10 deletions

19
sso/middleware.py Normal file
View File

@@ -0,0 +1,19 @@
class IGBMiddleware(object):
"""
Middleware to detect the EVE IGB
"""
def process_request(self, request):
request.is_igb = False
request.is_igb_trusted = False
if request.META.has_key('HTTP_EVE_TRUSTED'):
request.is_igb = True
if request.META.get('HTTP_EVE_TRUSTED') == 'Yes':
request.is_igb_trusted = True