Commit 4100653c authored by Mike Terhar's avatar Mike Terhar Committed by Dmytro Zaporozhets

Remove feature availability check for design_management

This allows any project that meets the technical specs to use
design_management features.
parent b22ee346
---
title: Remove design management as a license feature
merge_request: 28589
author:
type: added
......@@ -57,7 +57,7 @@ The following table depicts the various user permission levels in a project.
| View Dependency list **(ULTIMATE)** | ✓ (*1*) | ✓ | ✓ | ✓ | ✓ |
| View License list **(ULTIMATE)** | ✓ (*1*) | ✓ | ✓ | ✓ | ✓ |
| View licenses in Dependency list **(ULTIMATE)** | ✓ (*1*) | ✓ | ✓ | ✓ | ✓ |
| View [Design Management](project/issues/design_management.md) pages **(PREMIUM)** | ✓ | ✓ | ✓ | ✓ | ✓ |
| View [Design Management](project/issues/design_management.md) pages | ✓ | ✓ | ✓ | ✓ | ✓ |
| View project code | ✓ (*1*) | ✓ | ✓ | ✓ | ✓ |
| Pull project code | ✓ (*1*) | ✓ | ✓ | ✓ | ✓ |
| View GitLab Pages protected by [access control](project/pages/introduction.md#gitlab-pages-access-control-core) | ✓ | ✓ | ✓ | ✓ | ✓ |
......@@ -87,7 +87,7 @@ The following table depicts the various user permission levels in a project.
| Create/edit/delete [Releases](project/releases/index.md)| | | ✓ | ✓ | ✓ |
| Pull from [Conan repository](packages/conan_repository/index.md), [Maven repository](packages/maven_repository/index.md), or [NPM registry](packages/npm_registry/index.md) **(PREMIUM)** | | ✓ | ✓ | ✓ | ✓ |
| Publish to [Conan repository](packages/conan_repository/index.md), [Maven repository](packages/maven_repository/index.md), or [NPM registry](packages/npm_registry/index.md) **(PREMIUM)** | | | ✓ | ✓ | ✓ |
| Upload [Design Management](project/issues/design_management.md) files **(PREMIUM)** | | | ✓ | ✓ | ✓ |
| Upload [Design Management](project/issues/design_management.md) files | | | ✓ | ✓ | ✓ |
| Create new branches | | | ✓ | ✓ | ✓ |
| Push to non-protected branches | | | ✓ | ✓ | ✓ |
| Force push to non-protected branches | | | ✓ | ✓ | ✓ |
......
# Design Management **(PREMIUM)**
# Design Management
> [Introduced](https://gitlab.com/groups/gitlab-org/-/epics/660) in [GitLab Premium](https://about.gitlab.com/pricing/) 12.2.
......
......@@ -126,7 +126,7 @@ associated label or assignee will change to match that of the new column. The en
board can also be filtered to only include issues from a certain milestone or an overarching
label.
### Design Management **(PREMIUM)**
### Design Management
With [Design Management](design_management.md), you can upload design
assets to issues and view them all together to easily share and
......
......@@ -75,7 +75,7 @@ The following items will be exported:
- Project configuration, including services
- Issues with comments, merge requests with diffs and comments, labels, milestones, snippets,
and other project entities
- Design Management files and data **(PREMIUM)**
- Design Management files and data
- LFS objects
- Issue boards
- Pipelines history
......
......@@ -650,8 +650,7 @@ module EE
# a few releases until we are able to understand the impact of the
# 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)) &&
feature_available?(:design_management)
(hashed_storage?(:repository) || ::Feature.disabled?(:design_management_require_hashed_storage, self, default_enabled: true))
end
def design_repository
......
......@@ -64,7 +64,6 @@ class License < ApplicationRecord
default_project_deletion_protection
dependency_proxy
deploy_board
design_management
disable_name_update_for_users
email_additional_text
epics
......
......@@ -2048,18 +2048,19 @@ describe Project do
describe '#design_management_enabled?' do
let(:project) { build(:project) }
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
where(:lfs_enabled, :hashed_storage_enabled, :hash_storage_required, :expectation) do
false | false | false | false
false | true | true | false
false | true | false | false
false | false | true | false
true | false | false | true
true | true | true | true
true | true | false | true
true | false | true | false
end
with_them do
before do
stub_licensed_features(design_management: license_enabled)
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)
......
......@@ -99,19 +99,9 @@ describe DesignManagement::DesignPolicy do
it { is_expected.to be_disallowed(:create_design, :destroy_design) }
end
context "when the license does not include the feature" do
context "when DesignManagement is not enabled" do
before do
stub_licensed_features(design_management: false)
allow(Gitlab.config.lfs).to receive(:enabled).and_return(true)
end
it_behaves_like "design abilities not available"
end
context "when LFS is not enabled" do
before do
stub_licensed_features(design_management: true)
allow(Gitlab.config.lfs).to receive(:enabled).and_return(false)
enable_design_management(false)
end
it_behaves_like "design abilities not available"
......
......@@ -45,25 +45,6 @@ describe 'Getting designs related to an issue' do
Gitlab::UrlBuilder.build(design, ref: ref, size: size)
end
context 'when the feature is not available' do
before do
stub_licensed_features(design_management: false)
stub_feature_flags(design_managment: false)
end
it_behaves_like 'a working graphql query' do
before do
post_graphql(query, current_user: current_user)
end
end
it 'returns no designs' do
post_graphql(query, current_user: current_user)
expect(design_collection).to be_nil
end
end
context 'when the feature is available' do
before do
enable_design_management
......
......@@ -2,7 +2,6 @@
module DesignManagementTestHelpers
def enable_design_management(enabled = true, ref_filter = true)
stub_licensed_features(design_management: enabled)
stub_lfs_setting(enabled: enabled)
stub_feature_flags(design_management_reference_filter_gfm_pipeline: ref_filter)
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