debian-mirror-gitlab/app/controllers/projects/cluster_agents_controller.rb
2023-05-27 22:25:52 +05:30

25 lines
585 B
Ruby

# 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')