mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-22 20:12:00 -06:00
9856 fix graphiql test
This commit is contained in:
parent
347e453b7d
commit
634f35a972
@ -36,12 +36,6 @@ class NetBoxGraphQLView(GraphQLView):
|
||||
|
||||
# Enforce LOGIN_REQUIRED
|
||||
if settings.LOGIN_REQUIRED and not request.user.is_authenticated:
|
||||
|
||||
# If this is a human user, send a redirect to the login page
|
||||
# bug - todo?
|
||||
# if self.request_wants_html(request):
|
||||
# return redirect_to_login(reverse('graphql'))
|
||||
|
||||
return HttpResponseForbidden("No credentials provided.")
|
||||
return redirect_to_login(reverse('graphql'))
|
||||
|
||||
return super().dispatch(request, *args, **kwargs)
|
||||
|
@ -15,8 +15,6 @@ class GraphQLTestCase(TestCase):
|
||||
response = self.client.get(url)
|
||||
self.assertHttpStatus(response, 404)
|
||||
|
||||
'''
|
||||
BUG TODO - Re-enable
|
||||
@override_settings(LOGIN_REQUIRED=True)
|
||||
def test_graphiql_interface(self):
|
||||
"""
|
||||
@ -36,4 +34,3 @@ class GraphQLTestCase(TestCase):
|
||||
response = self.client.get(url, **header)
|
||||
with disable_warnings('django.request'):
|
||||
self.assertHttpStatus(response, 302) # Redirect to login page
|
||||
'''
|
||||
|
Loading…
Reference in New Issue
Block a user