Monkey patched User model. Poller js is templated. Plus minor changes
[flowspy] / utils / decorators.py
1 from django.http import HttpResponseRedirect
2 from django.core.urlresolvers import reverse
3
4
5 def shib_required(f):
6     def wrap(request, *args, **kwargs):
7         if 'HTTP_SHIB_SESSION_ID' not in request.META or not request.META['HTTP_SHIB_SESSION_ID']:
8             return HttpResponseRedirect(reverse('login'))
9         return f(request, *args, **kwargs)
10
11     wrap.__doc__=f.__doc__
12     wrap.__name__=f.__name__
13     return wrap