Commit fac5f1f4 authored by Bob Van Landuyt's avatar Bob Van Landuyt

Merge branch '12716-fix-graphql-ee' into 'master'

Remove the GraphGL feature flag in EE too

Closes #12716

See merge request gitlab-org/gitlab-ee!14611
parents 43d5f5a6 a5decfef
......@@ -571,12 +571,12 @@ module EE
end
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
# flag, because we don't want to enable design_management by default on
# on prem installs yet.
lfs_enabled? && ::Gitlab::Graphql.enabled? &&
lfs_enabled? &&
feature_available?(:design_management) &&
::Feature.enabled?(:design_management, self)
end
......
......@@ -12,10 +12,9 @@
%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 }
= s_('UsageQuota|Pipelines')
- if Gitlab::Graphql.enabled?
%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 }
= s_('UsageQuota|Storage')
%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 }
= s_('UsageQuota|Storage')
.nav-controls
= 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 @@
= render "namespaces/pipelines_quota/list",
locals: { namespace: @group, projects: @projects }
.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
describe "#design_management_enabled?" do
let(:project) { build(:project) }
where(:feature_enabled, :license_enabled, :graphql, :lfs, :expected) do
false | false | false | false | false
true | false | false | false | false
false | true | false | false | false
false | false | true | false | false
false | false | false | true | false
true | true | true | true | true
end
where(
feature_enabled: [false, true],
license_enabled: [false, true],
lfs_enabled: [false, true]
)
with_them do
before do
stub_licensed_features(design_management: license_enabled)
stub_feature_flags(design_management: feature_enabled, graphql: graphql)
expect(project).to receive(:lfs_enabled?).and_return(lfs)
stub_feature_flags(design_management: feature_enabled)
expect(project).to receive(:lfs_enabled?).and_return(lfs_enabled)
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
expect(project.design_management_enabled?).to be(expected)
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