Commit 3aa92531 authored by Yorick Peterse's avatar Yorick Peterse

Move EE code out of Gitlab::ObjectHierarchy

This moves all EE specific code out of Gitlab::ObjectHierarchy and into
EE::Gitlab::ObjectHierarchy.
parent 601c2881
# frozen_string_literal: true
module EE
module Gitlab
module ObjectHierarchy
# rubocop: disable CodeReuse/ActiveRecord
def roots
base_and_ancestors.where(namespaces: { parent_id: nil })
end
# rubocop: enable CodeReuse/ActiveRecord
end
end
end
......@@ -39,12 +39,6 @@ module Gitlab
end
# rubocop: enable CodeReuse/ActiveRecord
# rubocop: disable CodeReuse/ActiveRecord
def roots
base_and_ancestors.where(namespaces: { parent_id: nil })
end
# rubocop: enable CodeReuse/ActiveRecord
# Returns a relation that includes the ancestors_base set of objects
# and all their ancestors (recursively).
#
......@@ -179,3 +173,5 @@ module Gitlab
end
end
end
Gitlab::ObjectHierarchy.prepend(EE::Gitlab::ObjectHierarchy)
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