blob: 11b54db72ea43fe93121e8f13f1a1e83708a115f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
# frozen_string_literal: true
module Gitlab
class Gitpod
class << self
def feature_conditional?
feature.conditional?
end
def feature_available?
# The gitpod_bundle feature could be conditionally applied, so check if `!off?`
!feature.off?
end
def feature_enabled?(actor = nil)
feature.enabled?(actor)
end
def feature_and_settings_enabled?(actor = nil)
feature_enabled?(actor) && Gitlab::CurrentSettings.gitpod_enabled
end
private
def feature
Feature.get(:gitpod) # rubocop:disable Gitlab/AvoidFeatureGet
end
end
end
end
|