Commit 5acc3081 authored by Ash McKenzie's avatar Ash McKenzie

Merge branch 'bvl-design-management-only-available-with-graphql' into 'master'

GraphQL is required for design management.

See merge request gitlab-org/gitlab-ee!10799
parents a5bab14d 97fb0355
...@@ -576,7 +576,9 @@ module EE ...@@ -576,7 +576,9 @@ module EE
# Checking both feature availability on the license, as well as the feature # Checking both feature availability on the license, as well as the feature
# flag, because we don't want to enable design_management by default on # flag, because we don't want to enable design_management by default on
# on prem installs yet. # on prem installs yet.
feature_available?(:design_management) && ::Feature.enabled?(:design_management, self) # GraphQL is also required for using Design Management
feature_available?(:design_management) && ::Feature.enabled?(:design_management, self) &&
::Gitlab::Graphql.enabled?
end end
private private
......
...@@ -1887,17 +1887,18 @@ describe Project do ...@@ -1887,17 +1887,18 @@ describe Project do
describe "#design_management_enabled?" do describe "#design_management_enabled?" do
let(:project) { build(:project) } let(:project) { build(:project) }
where(:feature_enabled, :license_enabled, :expected) do where(:feature_enabled, :license_enabled, :graphql, :expected) do
false | false | false false | false | false | false
false | true | false false | true | false | false
true | false | false true | false | false | false
true | true | true false | false | true | false
true | true | true | true
end end
with_them do with_them do
before do before do
stub_licensed_features(design_management: license_enabled) stub_licensed_features(design_management: license_enabled)
stub_feature_flags(design_management: feature_enabled) stub_feature_flags(design_management: feature_enabled, graphql: graphql)
end end
it "knows if design management is available" do it "knows if design management is available" do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment