aboutsummaryrefslogtreecommitdiffstats
path: root/servo/lib
diff options
context:
space:
mode:
authorFilipp Lepalaan <filipp@mac.com>2021-05-12 20:56:17 +0300
committerFilipp Lepalaan <filipp@mac.com>2021-05-12 20:56:17 +0300
commit9326a6be300577965f7378bffbf6771240f52ad5 (patch)
treef739ef6a3d7a11f6188c54b1240fcefc1add6740 /servo/lib
parent0eb9ec451e94f160072d8e7503a7afcf2585d7f3 (diff)
downloadServo-9326a6be300577965f7378bffbf6771240f52ad5.tar.gz
Servo-9326a6be300577965f7378bffbf6771240f52ad5.tar.bz2
Servo-9326a6be300577965f7378bffbf6771240f52ad5.zip
Fix custom middleware
Diffstat (limited to 'servo/lib')
-rw-r--r--servo/lib/middleware.py4
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