Class: UffizziCore::Api::Cli::V1::Projects::Clusters::ApplicationController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- UffizziCore::Api::Cli::V1::Projects::Clusters::ApplicationController
- Defined in:
- app/controllers/uffizzi_core/api/cli/v1/projects/clusters/application_controller.rb
Direct Known Subclasses
Instance Method Summary collapse
Instance Method Details
#resource_cluster ⇒ Object
4 5 6 7 8 9 10 |
# File 'app/controllers/uffizzi_core/api/cli/v1/projects/clusters/application_controller.rb', line 4 def resource_cluster @resource_cluster ||= if request_by_admin? || valid_request_from_ci_workflow? active_project_clusters.find_by!(name: params[:cluster_name]) else active_project_clusters.deployed_by_user(current_user).find_by!(name: params[:cluster_name]) end end |