summaryrefslogtreecommitdiff
path: root/app/controllers/groups/packages_controller.rb
blob: 5d808d4c1c666a933a27e836f546e2a6364fbc65 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# frozen_string_literal: true

module Groups
  class PackagesController < Groups::ApplicationController
    before_action :verify_packages_enabled!

    feature_category :package_registry
    urgency :low

    # The show action renders index to allow frontend routing to work on page refresh
    def show
      render :index
    end

    private

    def verify_packages_enabled!
      render_404 unless group.packages_feature_enabled?
    end
  end
end