Commit 50ef042f authored by Matija Čupić's avatar Matija Čupić

Extract EE specific Clusters::CreateService logic to ee directory

parent 298f023e
module Clusters
class CreateService < BaseService
prepend EE::Clusters::CreateService
attr_reader :access_token
def execute(access_token = nil)
......@@ -29,9 +31,7 @@ module Clusters
end
def can_create_cluster?
return true if project.clusters.empty?
project.feature_available?(:multiple_clusters)
project.clusters.empty?
end
end
end
module EE
module Clusters
module CreateService
extend ::Gitlab::Utils::Override
override :can_create_cluster?
def can_create_cluster?
super || project.feature_available?(:multiple_clusters)
end
end
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment