mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Closes #1842: Implement support for Django 2.0
This commit is contained in:
@ -20,7 +20,7 @@ class LoginRequiredMiddleware(object):
|
||||
self.get_response = get_response
|
||||
|
||||
def __call__(self, request):
|
||||
if LOGIN_REQUIRED and not request.user.is_authenticated():
|
||||
if LOGIN_REQUIRED and not request.user.is_authenticated:
|
||||
# Redirect unauthenticated requests to the login page. API requests are exempt from redirection as the API
|
||||
# performs its own authentication.
|
||||
api_path = reverse('api-root')
|
||||
|
Reference in New Issue
Block a user