diff options
Diffstat (limited to 'lib/api/debian_group_packages.rb')
-rw-r--r-- | lib/api/debian_group_packages.rb | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/lib/api/debian_group_packages.rb b/lib/api/debian_group_packages.rb new file mode 100644 index 00000000000..e3cacc4132f --- /dev/null +++ b/lib/api/debian_group_packages.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +module API + class DebianGroupPackages < ::API::Base + params do + requires :id, type: String, desc: 'The ID of a group' + end + + resource :groups, requirements: API::NAMESPACE_OR_PROJECT_REQUIREMENTS do + before do + not_found! unless ::Feature.enabled?(:debian_packages, user_group) + + authorize_read_package!(user_group) + end + + namespace ':id/-/packages/debian' do + include DebianPackageEndpoints + end + end + end +end |