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

25 lines
575 B
Ruby
Raw Normal View History

2018-12-05 23:21:45 +05:30
# frozen_string_literal: true
2018-12-13 13:39:08 +05:30
class Projects::ClustersController < Clusters::ClustersController
include ProjectUnauthorized
2018-03-17 18:26:18 +05:30
2018-12-13 13:39:08 +05:30
prepend_before_action :project
before_action :repository
2018-03-17 18:26:18 +05:30
2018-12-13 13:39:08 +05:30
layout 'project'
2018-11-08 19:23:39 +05:30
2018-03-17 18:26:18 +05:30
private
2018-12-13 13:39:08 +05:30
def clusterable
@clusterable ||= ClusterablePresenter.fabricate(project, current_user: current_user)
2018-03-17 18:26:18 +05:30
end
2018-12-13 13:39:08 +05:30
def project
@project ||= find_routable!(Project, File.join(params[:namespace_id], params[:project_id]), not_found_or_authorized_proc: project_unauthorized_proc)
2018-03-17 18:26:18 +05:30
end
2018-03-27 19:54:05 +05:30
2018-12-13 13:39:08 +05:30
def repository
@repository ||= project.repository
2018-03-27 19:54:05 +05:30
end
2018-03-17 18:26:18 +05:30
end