AuScope / ckan-docker

Scripts and images to run CKAN using Docker Compose
0 stars 2 forks source link

Data download unsuccessful #239

Closed kitchenprinzessin3880 closed 1 week ago

kitchenprinzessin3880 commented 2 weeks ago

Tested both prod and dev repositories It seems like i need to login to download the file of public record e.g. https://repository.data.auscope.org.au/dataset/cloncurry-metal-multimodal-integrated-mineral-system-characterisation-data

downloaded file - https://repository.data.auscope.org.au/dataset/eda39b66-11ed-490b-9aa6-21f5653bf27f/resource/80708bde-702f-4af9-871b-06354dfaeb63/download/readme.txt

Screenshot 2024-06-19 at 7 46 38 PM

if i login as a member, editor or admin, i can download the public record.

stuartwoodman commented 2 weeks ago

Not sure how this ever worked, digging through the ckan code-base the error was thrown from the Resource read method when it calls the package_show action. Because the package_show wasn't annotated with the auth_allow_anonymous_access toolkit annotation, anonymous users couldn't access and a 403 would be thrown. With the annotation and a few extra checks to deny anonymous users access if the package is private, everything seems to be working again.

kitchenprinzessin3880 commented 1 week ago

tested prod and dev repositories. can download file from existing data and new record created