Welcome to mirror list, hosted at ThFree Co, Russian Federation.

infrastructure_registry_controller.rb « packages « projects « controllers « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: ee04cbb006210e3153d68d8b836158c28d33b45c (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 Projects
  module Packages
    class InfrastructureRegistryController < Projects::ApplicationController
      before_action :verify_feature_enabled!
      feature_category :infrastructure_as_code

      def show
        @package = project.packages.find(params[:id])
        @package_files = @package.package_files.recent
      end

      private

      def verify_feature_enabled!
        render_404 unless Feature.enabled?(:infrastructure_registry_page, default_enabled: :yaml)
      end
    end
  end
end