2019-12-26 22:10:19 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module Gitlab
|
|
|
|
class Sourcegraph
|
|
|
|
class << self
|
|
|
|
def feature_conditional?
|
|
|
|
feature.conditional?
|
|
|
|
end
|
|
|
|
|
|
|
|
def feature_available?
|
|
|
|
# The sourcegraph_bundle feature could be conditionally applied, so check if `!off?`
|
|
|
|
!feature.off?
|
|
|
|
end
|
|
|
|
|
2020-11-24 15:15:51 +05:30
|
|
|
def feature_enabled?(actor = nil)
|
|
|
|
feature.enabled?(actor)
|
2019-12-26 22:10:19 +05:30
|
|
|
end
|
|
|
|
|
|
|
|
private
|
|
|
|
|
|
|
|
def feature
|
2020-06-23 00:09:42 +05:30
|
|
|
Feature.get(:sourcegraph) # rubocop:disable Gitlab/AvoidFeatureGet
|
2019-12-26 22:10:19 +05:30
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|