debian-mirror-gitlab/lib/bulk_imports/features.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

20 lines
492 B
Ruby
Raw Normal View History

2022-11-25 23:54:43 +05:30
# 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