diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-19 12:08:42 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-19 12:08:42 +0300 |
commit | b76ae638462ab0f673e5915986070518dd3f9ad3 (patch) | |
tree | bdab0533383b52873be0ec0eb4d3c66598ff8b91 /lib/api/concerns/packages/debian_distribution_endpoints.rb | |
parent | 434373eabe7b4be9593d18a585fb763f1e5f1a6f (diff) |
Add latest changes from gitlab-org/gitlab@14-2-stable-eev14.2.0-rc42
Diffstat (limited to 'lib/api/concerns/packages/debian_distribution_endpoints.rb')
-rw-r--r-- | lib/api/concerns/packages/debian_distribution_endpoints.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/api/concerns/packages/debian_distribution_endpoints.rb b/lib/api/concerns/packages/debian_distribution_endpoints.rb index 4670c3e3521..798e583b87a 100644 --- a/lib/api/concerns/packages/debian_distribution_endpoints.rb +++ b/lib/api/concerns/packages/debian_distribution_endpoints.rb @@ -80,6 +80,8 @@ module API use :optional_distribution_params end get '/' do + authorize_read_package!(project_or_group) + distribution_params = declared_params(include_missing: false) distributions = ::Packages::Debian::DistributionsFinder.new(project_or_group, distribution_params).execute @@ -96,6 +98,8 @@ module API requires :codename, type: String, regexp: Gitlab::Regex.debian_distribution_regex, desc: 'The Debian Codename' end get '/:codename' do + authorize_read_package!(project_or_group) + distribution = ::Packages::Debian::DistributionsFinder.new(project_or_group, codename: params[:codename]).execute.last! present distribution, with: ::API::Entities::Packages::Debian::Distribution |