Commit 291f1264 authored by Jan Provaznik's avatar Jan Provaznik

Remove confidential_epics feature flag

This flag was enabled by default before. We can remove it
now.
parent ad06f01c
......@@ -266,7 +266,7 @@ POST /groups/:id/epics
| `title` | string | yes | The title of the epic |
| `labels` | string | no | The comma separated list of labels |
| `description` | string | no | The description of the epic. Limited to 1,048,576 characters. |
| `confidential` | boolean | no | Whether the epic should be confidential. Will be ignored if `confidential_epics` feature flag is disabled. |
| `confidential` | boolean | no | Whether the epic should be confidential |
| `start_date_is_fixed` | boolean | no | Whether start date should be sourced from `start_date_fixed` or from milestones (since 11.3) |
| `start_date_fixed` | string | no | The fixed start date of an epic (since 11.3) |
| `due_date_is_fixed` | boolean | no | Whether due date should be sourced from `due_date_fixed` or from milestones (since 11.3) |
......@@ -347,7 +347,7 @@ PUT /groups/:id/epics/:epic_iid
| `epic_iid` | integer/string | yes | The internal ID of the epic |
| `title` | string | no | The title of an epic |
| `description` | string | no | The description of an epic. Limited to 1,048,576 characters. |
| `confidential` | boolean | no | Whether the epic should be confidential. Will be ignored if `confidential_epics` feature flag is disabled. |
| `confidential` | boolean | no | Whether the epic should be confidential |
| `labels` | string | no | The comma separated list of labels |
| `start_date_is_fixed` | boolean | no | Whether start date should be sourced from `start_date_fixed` or from milestones (since 11.3) |
| `start_date_fixed` | string | no | The fixed start date of an epic (since 11.3) |
......
......@@ -2579,7 +2579,7 @@ input CreateEpicInput {
clientMutationId: String
"""
Indicates if the epic is confidential. Will be ignored if `confidential_epics` feature flag is disabled
Indicates if the epic is confidential
"""
confidential: Boolean
......@@ -16598,7 +16598,7 @@ input UpdateEpicInput {
clientMutationId: String
"""
Indicates if the epic is confidential. Will be ignored if `confidential_epics` feature flag is disabled
Indicates if the epic is confidential
"""
confidential: Boolean
......
......@@ -6977,7 +6977,7 @@
},
{
"name": "confidential",
"description": "Indicates if the epic is confidential. Will be ignored if `confidential_epics` feature flag is disabled",
"description": "Indicates if the epic is confidential",
"type": {
"kind": "SCALAR",
"name": "Boolean",
......@@ -48957,7 +48957,7 @@
},
{
"name": "confidential",
"description": "Indicates if the epic is confidential. Will be ignored if `confidential_epics` feature flag is disabled",
"description": "Indicates if the epic is confidential",
"type": {
"kind": "SCALAR",
"name": "Boolean",
......@@ -164,18 +164,6 @@ To make an epic confidential:
- **In an existing epic:** in the epic's sidebar, select **Edit** next to **Confidentiality** then
select **Turn on**.
### Disable confidential epics **(PREMIUM ONLY)**
The confidential epics feature is deployed behind a feature flag that is **enabled by default**.
[GitLab administrators with access to the GitLab Rails console](../../../administration/feature_flags.md)
can disable it for your self-managed instance.
To disable it:
```ruby
Feature.disable(:confidential_epics)
```
## Manage issues assigned to an epic
### Add a new issue to an epic
......
......@@ -18,7 +18,6 @@ class Groups::EpicsController < Groups::ApplicationController
before_action do
push_frontend_feature_flag(:vue_issuable_epic_sidebar, @group)
push_frontend_feature_flag(:confidential_epics, @group, default_enabled: true)
end
def new; end
......
......@@ -11,7 +11,6 @@ module Groups
before_action :persist_roadmap_layout, only: [:show]
before_action do
push_frontend_feature_flag(:roadmap_buffered_rendering, @group)
push_frontend_feature_flag(:confidential_epics, @group, default_enabled: true)
push_frontend_feature_flag(:async_filtering, @group)
end
......
......@@ -22,7 +22,7 @@ module Mutations
argument :confidential,
GraphQL::BOOLEAN_TYPE,
required: false,
description: 'Indicates if the epic is confidential. Will be ignored if `confidential_epics` feature flag is disabled'
description: 'Indicates if the epic is confidential'
argument :start_date_fixed,
GraphQL::STRING_TYPE,
......
......@@ -19,7 +19,7 @@ class EpicEntity < IssuableEntity
expose :due_date_fixed, :due_date_from_milestones
expose :state
expose :lock_version
expose :confidential, if: -> (epic) { Feature.enabled?(:confidential_epics, epic.group, default_enabled: true) }
expose :confidential
expose :web_url do |epic|
group_epic_path(epic.group, epic)
......
......@@ -4,7 +4,6 @@ module Epics
class CreateService < Epics::BaseService
def execute
set_date_params
params.extract!(:confidential) unless ::Feature.enabled?(:confidential_epics, group, default_enabled: true)
epic = group.epics.new
create(epic)
......
......@@ -13,7 +13,6 @@ module Epics
# start_date and end_date columns are no longer writable by users because those
# are composite fields managed by the system.
params.extract!(:start_date, :end_date)
params.extract!(:confidential) unless ::Feature.enabled?(:confidential_epics, group, default_enabled: true)
update_task_event(epic) || update(epic)
......
......@@ -69,7 +69,7 @@ module API
params do
requires :title, type: String, desc: 'The title of an epic'
optional :description, type: String, desc: 'The description of an epic'
optional :confidential, type: Boolean, desc: 'Indicates if the epic is confidential. Will be ignored if `confidential_epics` feature flag is disabled'
optional :confidential, type: Boolean, desc: 'Indicates if the epic is confidential'
optional :start_date, as: :start_date_fixed, type: String, desc: 'The start date of an epic'
optional :start_date_is_fixed, type: Boolean, desc: 'Indicates start date should be sourced from start_date_fixed field not the issue milestones'
optional :end_date, as: :due_date_fixed, type: String, desc: 'The due date of an epic'
......@@ -95,7 +95,7 @@ module API
requires :epic_iid, type: Integer, desc: 'The internal ID of an epic'
optional :title, type: String, desc: 'The title of an epic'
optional :description, type: String, desc: 'The description of an epic'
optional :confidential, type: Boolean, desc: 'Indicates if the epic is confidential. Will be ignored if `confidential_epics` feature flag is disabled'
optional :confidential, type: Boolean, desc: 'Indicates if the epic is confidential'
optional :start_date, as: :start_date_fixed, type: String, desc: 'The start date of an epic'
optional :start_date_is_fixed, type: Boolean, desc: 'Indicates start date should be sourced from start_date_fixed field not the issue milestones'
optional :end_date, as: :due_date_fixed, type: String, desc: 'The due date of an epic'
......
......@@ -312,20 +312,6 @@ RSpec.describe Groups::EpicsController do
expect(response).to match_response_schema('entities/epic', dir: 'ee')
end
context 'when confidential_epics flag is disabled' do
before do
stub_feature_flags(confidential_epics: false)
end
it 'does not include confidential attribute' do
group.add_developer(user)
show_epic(:json)
expect(response).to have_gitlab_http_status(:ok)
expect(json_response).not_to include("confidential")
end
end
context 'with unauthorized user' do
it 'returns a not found 404 response' do
show_epic(:json)
......
......@@ -15,10 +15,6 @@ RSpec.describe IssuablesHelper do
context 'for an epic' do
let_it_be(:epic) { create(:epic, author: user, description: 'epic text', confidential: true) }
before do
stub_feature_flags(confidential_epics: true)
end
it 'returns the correct data' do
@group = epic.group
......
......@@ -610,20 +610,6 @@ RSpec.describe API::Epics do
end
end
context 'when confidential_epics flag is disabled' do
before do
stub_feature_flags(confidential_epics: false)
post api(url, user), params: params
end
it 'ignores confidential attribute' do
epic = Epic.last
expect(epic.confidential).to be_falsey
end
end
it 'creates a new epic with labels param as array' do
params[:labels] = ['label1', 'label2', 'foo, bar', '&,?']
......@@ -724,19 +710,6 @@ RSpec.describe API::Epics do
end
end
context 'when confidential_epics flag is disabled' do
before do
stub_feature_flags(confidential_epics: false)
stub_licensed_features(epics: true)
put api(url, user), params: params
end
it 'does not include confidential attribute' do
expect(epic.reload.confidential).to be_falsey
end
end
it 'clears labels when labels param is nil' do
params[:labels] = 'label1'
put api(url, user), params: params
......
......@@ -96,19 +96,6 @@ RSpec.describe 'Creating an Epic' do
expect { post_graphql_mutation(mutation, current_user: current_user) }.not_to change(Epic, :count)
end
end
context 'when confidential_epics is disabled' do
before do
stub_feature_flags(confidential_epics: false)
end
it 'ignores confidential field' do
post_graphql_mutation(mutation, current_user: current_user)
epic_hash = mutation_response['epic']
expect(epic_hash['confidential']).to be_falsey
end
end
end
end
end
......@@ -132,19 +132,6 @@ RSpec.describe Mutations::Epics::Update do
it_behaves_like 'a mutation that returns top-level errors',
errors: ['The list of epic attributes is empty']
end
context 'when confidential_epics is disabled' do
before do
stub_feature_flags(confidential_epics: false)
end
it 'ignores confidential field' do
post_graphql_mutation(mutation, current_user: current_user)
epic_hash = mutation_response['epic']
expect(epic_hash['confidential']).to be_falsey
end
end
end
end
end
......@@ -25,20 +25,6 @@ RSpec.describe Epics::CreateService do
expect(epic.confidential).to be_truthy
expect(NewEpicWorker).to have_received(:perform_async).with(epic.id, user.id)
end
context 'when confidential_epics is disabled' do
before do
stub_feature_flags(confidential_epics: false)
end
it 'ignores confidential attribute' do
expect { subject }.to change { Epic.count }.by(1)
epic = Epic.last
expect(epic).to be_persisted
expect(epic.confidential).to be_falsey
end
end
end
context 'handling fixed dates' do
......
......@@ -60,19 +60,6 @@ RSpec.describe Epics::UpdateService do
it 'updates the last_edited_at value' do
expect { update_epic(opts) }.to change { epic.last_edited_at }
end
context 'when confidential_epics is disabled' do
before do
stub_feature_flags(confidential_epics: false)
end
it 'ignores confidential attribute on update' do
update_epic(opts)
expect(epic).to be_valid
expect(epic.confidential).to be_falsey
end
end
end
context 'when title has changed' do
......
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