Allow hidden package files to be downloaded
What does this MR do and why?
- Modifies installable package status to add hidden.
- Return installable package files to download a package file endpoint. https://docs.gitlab.com/ee/user/packages/generic_packages/#download-package-file
How to set up and validate locally
- Create a hidden package_file using rails console or APIs https://docs.gitlab.com/ee/user/packages/generic_packages/#publish-a-package-file using curl:
curl --header "PRIVATE-TOKEN: YOURTOKEN" \
--upload-file bin.zip \
"http://172.16.123.1:3000/api/v4/projects/1/packages/generic/corpus1_package/1.0.0/artifacts.zip?status=hidden&select=package_file"
- Use the following curl request to download the package file.
curl --header "PRIVATE-TOKEN: YOURTOKEN" \
"http://gitlab.localdev:3000/api/v4/projects/29/packages/generic/corpus1_package/1.0.0/artifacts.zip"
On master this should return 404 and on this branch it should return a file.
Numbered steps to set up and validate the change are strongly suggested.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #349184 (closed)
Edited by Aditya Tiwari