2020-09-28 05:09:35 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module API
|
2020-10-14 20:08:42 -04:00
|
|
|
class DebianGroupPackages < ::API::Base
|
2020-09-28 05:09:35 -04:00
|
|
|
params do
|
|
|
|
requires :id, type: String, desc: 'The ID of a group'
|
|
|
|
end
|
|
|
|
|
|
|
|
resource :groups, requirements: API::NAMESPACE_OR_PROJECT_REQUIREMENTS do
|
|
|
|
before do
|
2021-02-01 01:09:16 -05:00
|
|
|
require_packages_enabled!
|
|
|
|
|
2020-09-28 05:09:35 -04:00
|
|
|
not_found! unless ::Feature.enabled?(:debian_packages, user_group)
|
|
|
|
|
|
|
|
authorize_read_package!(user_group)
|
|
|
|
end
|
|
|
|
|
2021-04-23 05:10:03 -04:00
|
|
|
namespace ':id/-' do
|
|
|
|
include ::API::Concerns::Packages::DebianEndpoints
|
2020-09-28 05:09:35 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|