elixir-luxembourg / daisy

Data Information System (DAISY) is a data bookkeeping application designed to help Biomedical Research institutions with their GDPR compliance.
GNU Affero General Public License v3.0
12 stars 10 forks source link

Cannot create access object #403

Closed vildead closed 1 year ago

vildead commented 1 year ago

After clicking on + button, user is presented with blank modal box.

To reproduce

  1. go to any dataset logged in as any user (even datasteward)
  2. click on + button in Access section

Expected behavior Adding access object is allowed for all users with VIEW+EDIT permission. Changing access status ("to active) should require user being member of global datastewards group

thumbnail_image001
vildead commented 1 year ago
DEBUG 2023-01-18 14:58:55,615 utils 11286 140538002757440 search_objects query=None filter=defaultdict(<class 'list'>, {}) facets=('local_custodians', 'consent_status', 'data_types', 'deidentification_method', 'is_published') model_object=<class 'core.models.dataset.Dataset'> order_by=None
DEBUG 2023-01-18 15:03:45,318 checker 11286 140538002757440 [AutoChecker] Checking permission "core.protected_dataset" on Dataset: "MDEG2 data" for "Vilem DED": True.
WARNING 2023-01-18 15:03:48,012 log 11286 140538002757440 Forbidden (Permission denied): /dataset/1/access/add/
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/django/core/handlers/exception.py", line 47, in inner
    response = get_response(request)
  File "/usr/local/lib/python3.9/site-packages/django/core/handlers/base.py", line 181, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/usr/local/lib/python3.9/site-packages/django/views/generic/base.py", line 70, in view
    return self.dispatch(request, *args, **kwargs)
  File "/home/daisy/daisy/web/views/access.py", line 58, in dispatch
    return super().dispatch(request, *args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/django/views/generic/base.py", line 98, in dispatch
    return handler(request, *args, **kwargs)
  File "/home/daisy/daisy/web/views/access.py", line 41, in get
    raise PermissionDenied()
django.core.exceptions.PermissionDenied
WARNING 2023-01-18 15:03:48,012 log 11286 140538002757440 Forbidden (Permission denied): /dataset/1/access/add/
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/django/core/handlers/exception.py", line 47, in inner
    response = get_response(request)
  File "/usr/local/lib/python3.9/site-packages/django/core/handlers/base.py", line 181, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/usr/local/lib/python3.9/site-packages/django/views/generic/base.py", line 70, in view
    return self.dispatch(request, *args, **kwargs)
  File "/home/daisy/daisy/web/views/access.py", line 58, in dispatch
    return super().dispatch(request, *args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/django/views/generic/base.py", line 98, in dispatch
    return handler(request, *args, **kwargs)
  File "/home/daisy/daisy/web/views/access.py", line 41, in get
    raise PermissionDenied()
django.core.exceptions.PermissionDenied
vildead commented 1 year ago

Fixed by https://github.com/elixir-luxembourg/daisy/pull/404