diff options
Diffstat (limited to 'servo/lib')
-rw-r--r-- | servo/lib/middleware.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/servo/lib/middleware.py b/servo/lib/middleware.py index 0ee054a..89675e1 100644 --- a/servo/lib/middleware.py +++ b/servo/lib/middleware.py @@ -33,9 +33,9 @@ class LoginRequiredMiddleware: 'django.contrib.auth.middlware.AuthenticationMiddleware'. If that doesn't\ work, ensure your TEMPLATE_CONTEXT_PROCESSORS setting includes\ 'django.core.context_processors.auth'." - if not request.user.is_authenticated(): + if request.user.is_authenticated() == False: path = request.path_info.lstrip('/') - if not any(m.match(path) for m in EXEMPT_URLS): + if any(m.match(path) for m in EXEMPT_URLS) == False: return HttpResponseRedirect(settings.LOGIN_URL) return response |