gitlab-org--gitlab-foss/app/controllers/projects/cluster_agents_controller.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

23 lines
492 B
Ruby
Raw Normal View History

# frozen_string_literal: true
class Projects::ClusterAgentsController < Projects::ApplicationController
before_action :authorize_can_read_cluster_agent!
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')