summaryrefslogtreecommitdiff
path: root/app/controllers/projects/clusters/applications_controller.rb
blob: c7b6218d0073300f20681c99578609a73070037f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# frozen_string_literal: true

class Projects::Clusters::ApplicationsController < Clusters::ApplicationsController
  include ProjectUnauthorized

  prepend_before_action :project

  private

  def clusterable
    @clusterable ||= ClusterablePresenter.fabricate(project, current_user: current_user)
  end

  def project
    @project ||= find_routable!(Project, File.join(params[:namespace_id], params[:project_id]), not_found_or_authorized_proc: project_unauthorized_proc)
  end
end