diff options
author | Douwe Maan <douwe@gitlab.com> | 2018-12-14 18:13:25 +0300 |
---|---|---|
committer | GitLab Release Tools Bot <robert+release-tools@gitlab.com> | 2018-12-18 22:39:51 +0300 |
commit | 78266bb05838a6609e19e8ab8fb60b48a675c0c8 (patch) | |
tree | b2b765ee1c8d728f874bd5f5a306fb2f890d8466 /lib | |
parent | 554cd0135257a7cfd959d5dbcbd8889345c01f10 (diff) |
Merge branch 'remove-issue-suggestions-flag' into 'master'
Remove issue_suggestions feature flag
Closes #55166
See merge request gitlab-org/gitlab-ce!23723
(cherry picked from commit a0fd68288d3f8f57d1c65423f08fc6a99824de1d)
2bb468d6 Remove issue_suggestions feature flag
744f6ed1 Enable GraphQL API endpoint
2e8d0153 Pass on arguments passed to the FeatureConstrainer
Diffstat (limited to 'lib')
-rw-r--r-- | lib/constraints/feature_constrainer.rb | 8 | ||||
-rw-r--r-- | lib/gitlab/graphql.rb | 4 |
2 files changed, 8 insertions, 4 deletions
diff --git a/lib/constraints/feature_constrainer.rb b/lib/constraints/feature_constrainer.rb index ca4376a9d38..cd246cf37a4 100644 --- a/lib/constraints/feature_constrainer.rb +++ b/lib/constraints/feature_constrainer.rb @@ -2,14 +2,14 @@ module Constraints class FeatureConstrainer - attr_reader :feature + attr_reader :args - def initialize(feature) - @feature = feature + def initialize(*args) + @args = args end def matches?(_request) - Feature.enabled?(feature) + Feature.enabled?(*args) end end end diff --git a/lib/gitlab/graphql.rb b/lib/gitlab/graphql.rb index 74c04e5380e..8a59e83974f 100644 --- a/lib/gitlab/graphql.rb +++ b/lib/gitlab/graphql.rb @@ -3,5 +3,9 @@ module Gitlab module Graphql StandardGraphqlError = Class.new(StandardError) + + def self.enabled? + Feature.enabled?(:graphql, default_enabled: true) + end end end |