Allow generic package file endpoint to return hidden packages

The API endpoint Download a package file https://docs.gitlab.com/ee/user/packages/generic_packages/#download-package-file, does not return a Package with status: hidden even when asked explicitly.

We are using Packages with status: hidden to store a coverage fuzzing corpus uploaded by the users. We need to fetch this Package in gitlab-coverage-fuzzing job but as the package is hidden we are getting 404.

This issue is to allow the Download a package file https://docs.gitlab.com/ee/user/packages/generic_packages/#download-package-file endpoint to return a hidden package whenever asked explicitly.

code ref: https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/api/generic_packages.rb#L98

Edited by Aditya Tiwari