01ed3a1511
Include a new policy in Clusterables (projects and groups), which checks if another cluster can be added clusterable_has_cluster? and multiple_clusters_available private methods will be overriden in EE Related to https://gitlab.com/gitlab-org/gitlab-ce/issues/34758
14 lines
219 B
Ruby
14 lines
219 B
Ruby
# frozen_string_literal: true
|
|
|
|
module ClusterableActions
|
|
private
|
|
|
|
# Overridden on EE module
|
|
def multiple_clusters_available?
|
|
false
|
|
end
|
|
|
|
def clusterable_has_clusters?
|
|
!subject.clusters.empty?
|
|
end
|
|
end
|