diff options
Diffstat (limited to 'app/controllers/projects/cluster_agents_controller.rb')
-rw-r--r-- | app/controllers/projects/cluster_agents_controller.rb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/app/controllers/projects/cluster_agents_controller.rb b/app/controllers/projects/cluster_agents_controller.rb new file mode 100644 index 00000000000..e7fbe93131d --- /dev/null +++ b/app/controllers/projects/cluster_agents_controller.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +class Projects::ClusterAgentsController < Projects::ApplicationController + before_action :authorize_can_read_cluster_agent! + + feature_category :kubernetes_management + + def show + @agent_name = params[:name] + end + + private + + def authorize_can_read_cluster_agent! + return if can?(current_user, :admin_cluster, project) + + access_denied! + end +end |