mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
9856 temp fix tests
This commit is contained in:
@ -36,6 +36,7 @@ class NetBoxGraphQLView(GraphQLView):
|
||||
|
||||
# Enforce LOGIN_REQUIRED
|
||||
if settings.LOGIN_REQUIRED and not request.user.is_authenticated:
|
||||
return redirect_to_login(reverse('graphql'))
|
||||
# return redirect_to_login(reverse('graphql'))
|
||||
return HttpResponseForbidden("No credentials provided.")
|
||||
|
||||
return super().dispatch(request, *args, **kwargs)
|
||||
|
@ -33,4 +33,5 @@ class GraphQLTestCase(TestCase):
|
||||
self.client.logout()
|
||||
response = self.client.get(url, **header)
|
||||
with disable_warnings('django.request'):
|
||||
self.assertHttpStatus(response, 302) # Redirect to login page
|
||||
# self.assertHttpStatus(response, 302) # Redirect to login page
|
||||
self.assertHttpStatus(response, 403) # Redirect to login page
|
||||
|
Reference in New Issue
Block a user