Commit d19bd189 authored by Luke Duncalfe's avatar Luke Duncalfe

Remove design_management_flag feature flag

https://gitlab.com/gitlab-org/gitlab/issues/13709
parent 15136629
...@@ -663,12 +663,7 @@ module EE ...@@ -663,12 +663,7 @@ module EE
# hashed storage requirement for existing design management projects. # hashed storage requirement for existing design management projects.
# See https://gitlab.com/gitlab-org/gitlab/issues/13428#note_238729038 # See https://gitlab.com/gitlab-org/gitlab/issues/13428#note_238729038
(hashed_storage?(:repository) || ::Feature.disabled?(:design_management_require_hashed_storage, self, default_enabled: true)) && (hashed_storage?(:repository) || ::Feature.disabled?(:design_management_require_hashed_storage, self, default_enabled: true)) &&
# Check both feature availability on the license, as well as the feature feature_available?(:design_management)
# flag, because we don't want to enable design_management by default on
# on prem installs yet.
# See https://gitlab.com/gitlab-org/gitlab/issues/13709
feature_available?(:design_management) &&
::Feature.enabled?(:design_management_flag, self, default_enabled: true)
end end
def design_repository def design_repository
......
---
title: Remove the design_management_flag feature flag from the codebase. The feature
flag toggles the Design Management feature, and has been enabled by default since
12.2.
merge_request: 20883
author:
type: other
...@@ -9,8 +9,6 @@ describe 'Issue page tabs', :js do ...@@ -9,8 +9,6 @@ describe 'Issue page tabs', :js do
describe 'discussions tab counter' do describe 'discussions tab counter' do
before do before do
stub_licensed_features(design_management: true)
stub_feature_flags(design_management_flag: true)
allow(Ability).to receive(:allowed?) { true } allow(Ability).to receive(:allowed?) { true }
end end
......
...@@ -1903,20 +1903,19 @@ describe Project do ...@@ -1903,20 +1903,19 @@ 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, :lfs_enabled, :hashed_storage_enabled, :hash_storage_required, :expectation) do where(:license_enabled, :lfs_enabled, :hashed_storage_enabled, :hash_storage_required, :expectation) do
false | false | false | false | false | false false | false | false | false | false
true | false | false | false | false | false true | false | false | false | false
true | true | false | false | false | false true | true | false | false | true
true | true | true | false | false | true true | true | false | true | false
true | true | true | false | true | false true | true | true | false | true
true | true | true | true | false | true true | true | true | true | true
true | true | 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_flag: feature_enabled, design_management_require_hashed_storage: hash_storage_required) stub_feature_flags(design_management_require_hashed_storage: hash_storage_required)
expect(project).to receive(:lfs_enabled?).and_return(lfs_enabled) expect(project).to receive(:lfs_enabled?).and_return(lfs_enabled)
allow(project).to receive(:hashed_storage?).with(:repository).and_return(hashed_storage_enabled) allow(project).to receive(:hashed_storage?).with(:repository).and_return(hashed_storage_enabled)
end end
......
...@@ -99,20 +99,9 @@ describe DesignManagement::DesignPolicy do ...@@ -99,20 +99,9 @@ describe DesignManagement::DesignPolicy do
it { is_expected.to be_disallowed(:create_design, :destroy_design) } it { is_expected.to be_disallowed(:create_design, :destroy_design) }
end end
context "when the feature flag is off" do
before do
stub_licensed_features(design_management: true)
stub_feature_flags(design_management_flag: false)
allow(Gitlab.config.lfs).to receive(:enabled).and_return(true)
end
it_behaves_like "design abilities not available"
end
context "when the license does not include the feature" do context "when the license does not include the feature" do
before do before do
stub_licensed_features(design_management: false) stub_licensed_features(design_management: false)
stub_feature_flags(design_management_flag: true)
allow(Gitlab.config.lfs).to receive(:enabled).and_return(true) allow(Gitlab.config.lfs).to receive(:enabled).and_return(true)
end end
...@@ -122,7 +111,6 @@ describe DesignManagement::DesignPolicy do ...@@ -122,7 +111,6 @@ describe DesignManagement::DesignPolicy do
context "when LFS is not enabled" do context "when LFS is not enabled" do
before do before do
stub_licensed_features(design_management: true) stub_licensed_features(design_management: true)
stub_feature_flags(design_management_flag: true)
allow(Gitlab.config.lfs).to receive(:enabled).and_return(false) allow(Gitlab.config.lfs).to receive(:enabled).and_return(false)
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