2021-10-06 02:09:43 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
class Projects::ClusterAgentsController < Projects::ApplicationController
|
|
|
|
before_action :authorize_can_read_cluster_agent!
|
|
|
|
|
|
|
|
feature_category :kubernetes_management
|
2022-04-28 14:10:01 -04:00
|
|
|
urgency :low
|
2021-10-06 02:09:43 -04:00
|
|
|
|
|
|
|
def show
|
|
|
|
@agent_name = params[:name]
|
|
|
|
end
|
|
|
|
|
|
|
|
private
|
|
|
|
|
|
|
|
def authorize_can_read_cluster_agent!
|
2022-01-27 19:14:06 -05:00
|
|
|
return if can?(current_user, :read_cluster, project)
|
2021-10-06 02:09:43 -04:00
|
|
|
|
|
|
|
access_denied!
|
|
|
|
end
|
|
|
|
end
|
2021-11-05 14:12:21 -04:00
|
|
|
|
|
|
|
Projects::ClusterAgentsController.prepend_mod_with('Projects::ClusterAgentsController')
|