Commit 248566e6 authored by Bob Van Landuyt's avatar Bob Van Landuyt

Merge branch '32492-remove-design_management_todos_api-feature-flag' into 'master'

Remove design_management_todos_api feature flag

See merge request gitlab-org/gitlab!26342
parents 201a68a2 b4944c18
......@@ -18,16 +18,6 @@ module EE
def authorize_can_read!
authorize!(:read_epic, epic)
end
override :find_todos
def find_todos
todos = super
return todos if ::Feature.enabled?(:design_management_todos_api, default_enabled: true)
# Exclude Design Todos if the feature is disabled
todos.where.not(target_type: ::DesignManagement::Design.name) # rubocop: disable CodeReuse/ActiveRecord
end
end
resource :groups, requirements: ::API::API::NAMESPACE_OR_PROJECT_REQUIREMENTS do
......
......@@ -75,7 +75,6 @@ describe API::Todos do
get api('/todos', personal_access_token: pat)
end
context 'when the feature is enabled' do
before do
api_request
end
......@@ -96,20 +95,6 @@ describe API::Todos do
)
end
end
context 'when the feature is disabled' do
before do
stub_feature_flags(design_management_todos_api: false)
api_request
end
it_behaves_like 'an endpoint that responds with success'
it 'does not include the Design Todo in the response' do
expect(json_response).to be_empty
end
end
end
end
describe 'POST :id/epics/:epic_iid/todo' do
......
......@@ -13,13 +13,6 @@ module API
'issues' => ->(iid) { find_project_issue(iid) }
}.freeze
helpers do
# EE::API::Todos would override this method
def find_todos
TodosFinder.new(current_user, params).execute
end
end
params do
requires :id, type: String, desc: 'The ID of a project'
end
......@@ -48,6 +41,10 @@ module API
resource :todos do
helpers do
def find_todos
TodosFinder.new(current_user, params).execute
end
def issuable_and_awardable?(type)
obj_type = Object.const_get(type, false)
......
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