Skip to content
This repository was archived by the owner on Sep 16, 2022. It is now read-only.

Commit c535c71

Browse files
author
Hannu Kamarainen
committed
CSCMETAX-61: [FIX] Restrict /datasets/pid/files from public
1 parent 64a626e commit c535c71

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/metax_api/api/rest/base/views/dataset_view.py

+3
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,9 @@ def files_get(self, request, pk=None):
198198
Get files associated to this dataset. Can be used to retrieve a list of only
199199
deleted files by providing the query parameter removed_files=true.
200200
"""
201+
if not request.user.username:
202+
raise Http403
203+
201204
params = {}
202205
manager = 'objects'
203206
# TODO: This applies only to IDA files, not remote resources.

0 commit comments

Comments
 (0)