Commit 3d68f364 authored by Mayra Cabrera's avatar Mayra Cabrera

Merge branch '13709-remove-design-management-flag' into 'master'

Remove design_management_flag feature flag

See merge request gitlab-org/gitlab!20883
parents fcea0e21 d19bd189
......@@ -663,12 +663,7 @@ module EE
# hashed storage requirement for existing design management projects.
# 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)) &&
# Check 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.
# See https://gitlab.com/gitlab-org/gitlab/issues/13709
feature_available?(:design_management) &&
::Feature.enabled?(:design_management_flag, self, default_enabled: true)
feature_available?(:design_management)
end
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
describe 'discussions tab counter' do
before do
stub_licensed_features(design_management: true)
stub_feature_flags(design_management_flag: true)
allow(Ability).to receive(:allowed?) { true }
end
......
......@@ -1903,20 +1903,19 @@ describe Project do
describe '#design_management_enabled?' do
let(:project) { build(:project) }
where(:feature_enabled, :license_enabled, :lfs_enabled, :hashed_storage_enabled, :hash_storage_required, :expectation) do
false | false | false | false | false | false
true | false | false | false | false | false
true | true | false | false | false | false
true | true | true | false | false | true
true | true | true | false | true | false
true | true | true | true | false | true
true | true | true | true | true | true
where(:license_enabled, :lfs_enabled, :hashed_storage_enabled, :hash_storage_required, :expectation) do
false | false | false | false | false
true | false | false | false | false
true | true | false | false | true
true | true | false | true | false
true | true | true | false | true
true | true | true | true | true
end
with_them do
before do
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)
allow(project).to receive(:hashed_storage?).with(:repository).and_return(hashed_storage_enabled)
end
......
......@@ -99,20 +99,9 @@ describe DesignManagement::DesignPolicy do
it { is_expected.to be_disallowed(:create_design, :destroy_design) }
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
before do
stub_licensed_features(design_management: false)
stub_feature_flags(design_management_flag: true)
allow(Gitlab.config.lfs).to receive(:enabled).and_return(true)
end
......@@ -122,7 +111,6 @@ describe DesignManagement::DesignPolicy do
context "when LFS is not enabled" do
before do
stub_licensed_features(design_management: true)
stub_feature_flags(design_management_flag: true)
allow(Gitlab.config.lfs).to receive(:enabled).and_return(false)
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