Commit 364ecdc07536078d7d84b93c3a7321042253410c

Authored by Sergio Oliveira
1 parent 21c144b7

Do not use registration middleware if browserid is disabled

Showing 1 changed file with 3 additions and 0 deletions   Show diff stats
colab/accounts/middleware.py
1 1  
2 2 from django.shortcuts import redirect
  3 +from django.conf import settings
3 4  
4 5 VIEW_NAMES_ALLOWED = ('signup', 'Logout')
5 6  
... ... @@ -7,6 +8,8 @@ VIEW_NAMES_ALLOWED = ('signup', 'Logout')
7 8 class UserRegisterMiddleware(object):
8 9  
9 10 def process_view(self, request, view_func, view_args, view_kwargs):
  11 + if not settings.BROWSERID_ENABLED:
  12 + return
10 13  
11 14 if request.is_ajax():
12 15 return
... ...