debian-mirror-gitlab/app/controllers/projects/cluster_agents_controller.rb

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

22 lines
477 B
Ruby
Raw Normal View History

2021-11-18 22:05:49 +05:30
# 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!
2022-04-04 11:22:00 +05:30
return if can?(current_user, :read_cluster, project)
2021-11-18 22:05:49 +05:30
access_denied!
end
end
2021-12-11 22:18:48 +05:30
Projects::ClusterAgentsController.prepend_mod_with('Projects::ClusterAgentsController')