Welcome to mirror list, hosted at ThFree Co, Russian Federation.

features.rb « bulk_imports « lib - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 9fdceb03655ae42a94f2af231d2f637b1a4b4bd7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# frozen_string_literal: true

module BulkImports
  module Features
    def self.project_migration_enabled?(destination_namespace = nil)
      if destination_namespace.present?
        root_ancestor = Namespace.find_by_full_path(destination_namespace)&.root_ancestor

        ::Feature.enabled?(:bulk_import_projects, root_ancestor)
      else
        ::Feature.enabled?(:bulk_import_projects)
      end
    end
  end
end