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

models_controller.rb « ml « projects « controllers « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 77855b73cbdaa7f9e520edbea038633515adca1a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# frozen_string_literal: true

module Projects
  module Ml
    class ModelsController < ::Projects::ApplicationController
      before_action :check_feature_enabled
      feature_category :mlops

      def index
        @models = ::Projects::Ml::ModelFinder.new(@project).execute
      end

      private

      def check_feature_enabled
        render_404 unless can?(current_user, :read_model_registry, @project)
      end
    end
  end
end