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

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

class Projects::ClusterAgentsController < Projects::ApplicationController
  include KasCookie

  before_action :authorize_can_read_cluster_agent!
  before_action :set_kas_cookie, only: [:show], if: -> { current_user }

  feature_category :kubernetes_management
  urgency :low

  def show
    @agent_name = params[:name]
  end

  private

  def authorize_can_read_cluster_agent!
    return if can?(current_user, :read_cluster, project)

    access_denied!
  end
end

Projects::ClusterAgentsController.prepend_mod_with('Projects::ClusterAgentsController')