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: 952e8e62d7139c267749588884dc44fb84fb22bd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# frozen_string_literal: true

module BulkImports
  module Features
    def self.enabled?
      ::Feature.enabled?(:bulk_import)
    end

    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