Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auth check fails on missing request data #55

Open
sergei-maertens opened this issue May 3, 2019 · 0 comments
Open

Auth check fails on missing request data #55

sergei-maertens opened this issue May 3, 2019 · 0 comments

Comments

@sergei-maertens
Copy link
Contributor

https://github.com/VNG-Realisatie/gemma-zaakregistratiecomponent/pull/53/files

ERROR: test_create_zaakobject_limited_to_authorized_zaken (zrc.api.tests.test_auth.ZaakObjectTests) (vertrouwelijkheidaanduiding='vertrouwelijk', zaaktype='https://zaaktype.nl/ok')
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/bbt/code/zaken/zrc/src/zrc/api/tests/test_auth.py", line 272, in test_create_zaakobject_limited_to_authorized_zaken
    response = self.client.post(url, {})
  File "/home/bbt/.virtualenvs/zrc/lib/python3.6/site-packages/rest_framework/test.py", line 300, in post
    path, data=data, format=format, content_type=content_type, **extra)
  File "/home/bbt/.virtualenvs/zrc/lib/python3.6/site-packages/rest_framework/test.py", line 213, in post
    return self.generic('POST', path, data, content_type, **extra)
  File "/home/bbt/.virtualenvs/zrc/lib/python3.6/site-packages/rest_framework/test.py", line 238, in generic
    method, path, data, content_type, secure, **extra)
  File "/home/bbt/.virtualenvs/zrc/lib/python3.6/site-packages/django/test/client.py", line 404, in generic
    return self.request(**r)
  File "/home/bbt/.virtualenvs/zrc/lib/python3.6/site-packages/rest_framework/test.py", line 289, in request
    return super(APIClient, self).request(**kwargs)
  File "/home/bbt/.virtualenvs/zrc/lib/python3.6/site-packages/rest_framework/test.py", line 241, in request
    request = super(APIRequestFactory, self).request(**kwargs)
  File "/home/bbt/.virtualenvs/zrc/lib/python3.6/site-packages/django/test/client.py", line 485, in request
    raise exc_value
  File "/home/bbt/.virtualenvs/zrc/lib/python3.6/site-packages/django/core/handlers/exception.py", line 35, in inner
    response = get_response(request)
  File "/home/bbt/.virtualenvs/zrc/lib/python3.6/site-packages/django/core/handlers/base.py", line 128, in _get_response
    response = self.process_exception_by_middleware(e, request)
  File "/home/bbt/.virtualenvs/zrc/lib/python3.6/site-packages/django/core/handlers/base.py", line 126, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/home/bbt/.virtualenvs/zrc/lib/python3.6/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view
    return view_func(*args, **kwargs)
  File "/home/bbt/.virtualenvs/zrc/lib/python3.6/site-packages/rest_framework/viewsets.py", line 103, in view
    return self.dispatch(request, *args, **kwargs)
  File "/home/bbt/.virtualenvs/zrc/lib/python3.6/site-packages/rest_framework/views.py", line 483, in dispatch
    response = self.handle_exception(exc)
  File "/home/bbt/.virtualenvs/zrc/lib/python3.6/site-packages/rest_framework/views.py", line 443, in handle_exception
    self.raise_uncaught_exception(exc)
  File "/home/bbt/.virtualenvs/zrc/lib/python3.6/site-packages/rest_framework/views.py", line 471, in dispatch
    self.initial(request, *args, **kwargs)
  File "/home/bbt/.virtualenvs/zrc/lib/python3.6/site-packages/rest_framework/views.py", line 389, in initial
    self.check_permissions(request)
  File "/home/bbt/.virtualenvs/zrc/lib/python3.6/site-packages/rest_framework/views.py", line 322, in check_permissions
    if not permission.has_permission(request, self):
  File "/home/bbt/code/zaken/vng-api-common/vng_api_common/permissions.py", line 99, in has_permission
    zaaktype = self.get_zaaktype_from_request(request)
  File "/home/bbt/code/zaken/vng-api-common/vng_api_common/permissions.py", line 152, in get_zaaktype_from_request
    zaak_url = urlparse(request.data['zaak']).path
KeyError: 'zaak'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant