Commit a5decfef authored by Nick Thomas's avatar Nick Thomas

Remove the Graphql feature flag in EE too

parent 08423878
...@@ -571,12 +571,12 @@ module EE ...@@ -571,12 +571,12 @@ module EE
end end
def design_management_enabled? def design_management_enabled?
# LFS and GraphQL are required for using Design Management # LFS is required for using Design Management
# #
# 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.
lfs_enabled? && ::Gitlab::Graphql.enabled? && lfs_enabled? &&
feature_available?(:design_management) && feature_available?(:design_management) &&
::Feature.enabled?(:design_management, self) ::Feature.enabled?(:design_management, self)
end end
......
...@@ -12,10 +12,9 @@ ...@@ -12,10 +12,9 @@
%li.nav-item %li.nav-item
%a.nav-link#pipelines-quota{ data: { toggle: "tab", action: '#pipelines-quota-tab' }, href: '#pipelines-quota-tab', 'aria-controls': '#pipelines-quota-tab', 'aria-selected': true } %a.nav-link#pipelines-quota{ data: { toggle: "tab", action: '#pipelines-quota-tab' }, href: '#pipelines-quota-tab', 'aria-controls': '#pipelines-quota-tab', 'aria-selected': true }
= s_('UsageQuota|Pipelines') = s_('UsageQuota|Pipelines')
- if Gitlab::Graphql.enabled? %li.nav-item
%li.nav-item %a.nav-link#storage-quota{ data: { toggle: "tab", action: '#storage-quota-tab' }, href: '#storage-quota-tab', 'aria-controls': '#storage-quota-tab', 'aria-selected': false }
%a.nav-link#storage-quota{ data: { toggle: "tab", action: '#storage-quota-tab' }, href: '#storage-quota-tab', 'aria-controls': '#storage-quota-tab', 'aria-selected': false } = s_('UsageQuota|Storage')
= s_('UsageQuota|Storage')
.nav-controls .nav-controls
= link_to s_('UsageQuota|Buy additional minutes'), EE::SUBSCRIPTIONS_PLANS_URL, target: '_blank', class: 'btn btn-inverted btn-success float-right' = link_to s_('UsageQuota|Buy additional minutes'), EE::SUBSCRIPTIONS_PLANS_URL, target: '_blank', class: 'btn btn-inverted btn-success float-right'
...@@ -24,6 +23,5 @@ ...@@ -24,6 +23,5 @@
= render "namespaces/pipelines_quota/list", = render "namespaces/pipelines_quota/list",
locals: { namespace: @group, projects: @projects } locals: { namespace: @group, projects: @projects }
.tab-pane#storage-quota-tab .tab-pane#storage-quota-tab
- if Gitlab::Graphql.enabled? #js-storage-counter-app{ data: { namespace_path: @group.full_path } }
#js-storage-counter-app{ data: { namespace_path: @group.full_path } }
...@@ -1833,22 +1833,23 @@ describe Project do ...@@ -1833,22 +1833,23 @@ 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, :graphql, :lfs, :expected) do
false | false | false | false | false where(
true | false | false | false | false feature_enabled: [false, true],
false | true | false | false | false license_enabled: [false, true],
false | false | true | false | false lfs_enabled: [false, true]
false | false | false | true | false )
true | true | true | true | true
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, graphql: graphql) stub_feature_flags(design_management: feature_enabled)
expect(project).to receive(:lfs_enabled?).and_return(lfs) expect(project).to receive(:lfs_enabled?).and_return(lfs_enabled)
end end
# Design management is only available if all dependencies are enabled
let(:expected) { feature_enabled && license_enabled && lfs_enabled }
it "knows if design management is available" do it "knows if design management is available" do
expect(project.design_management_enabled?).to be(expected) expect(project.design_management_enabled?).to be(expected)
end end
......
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