Commit 0db97470 authored by Mark Chao's avatar Mark Chao

Merge branch 'fj-251080-remove-restricted_snippet_scope_search-flag' into 'master'

Remove restricted_snippet_scope_search flag

See merge request gitlab-org/gitlab!43153
parents 150474e5 a14eddb6
......@@ -90,7 +90,6 @@ module EE
@current_user &&
@show_snippets &&
::Gitlab.com? &&
::Feature.enabled?(:restricted_snippet_scope_search, default_enabled: true) &&
::Gitlab::CurrentSettings.search_using_elasticsearch?(scope: nil)
end
end
......
---
name: restricted_snippet_scope_search
introduced_by_url:
rollout_issue_url:
group:
type: development
default_enabled: true
......@@ -10,7 +10,6 @@ module EE
override :finder_params
def finder_params
return super unless ::Gitlab.com?
return super unless ::Feature.enabled?(:restricted_snippet_scope_search, default_enabled: true)
{ authorized_and_user_personal: true }
end
......
......@@ -68,7 +68,6 @@ RSpec.describe SearchHelper do
describe '#search_entries_info_template' do
let(:com_value) { true }
let(:flag_enabled) { true }
let(:elasticsearch_enabled) { true }
let(:show_snippets) { true }
let(:collection) { Kaminari.paginate_array([:foo]).page(1).per(10) }
......@@ -83,7 +82,6 @@ RSpec.describe SearchHelper do
@current_user = user
allow(Gitlab).to receive(:com?).and_return(com_value)
stub_feature_flags(restricted_snippet_scope_search: flag_enabled)
stub_ee_application_setting(search_using_elasticsearch: elasticsearch_enabled)
end
......@@ -105,12 +103,6 @@ RSpec.describe SearchHelper do
it_behaves_like 'returns old message'
end
context 'when flag restricted_snippet_scope_search is not enabled' do
let(:flag_enabled) { false }
it_behaves_like 'returns old message'
end
context 'when elastic search is not enabled' do
let(:elasticsearch_enabled) { false }
......
......@@ -5,13 +5,11 @@ RSpec.describe Gitlab::SnippetSearchResults do
let_it_be(:snippet) { create(:snippet, title: 'foo', description: 'foo') }
let(:user) { snippet.author }
let(:com_value) { true }
let(:flag_enabled) { true }
subject { described_class.new(user, 'foo').objects('snippet_titles') }
before do
allow(Gitlab).to receive(:com?).and_return(com_value)
stub_feature_flags(restricted_snippet_scope_search: flag_enabled)
end
context 'when all requirements are met' do
......@@ -31,14 +29,4 @@ RSpec.describe Gitlab::SnippetSearchResults do
subject
end
end
context 'when flag restricted_snippet_scope_search is not enabled' do
let(:flag_enabled) { false }
it 'calls the finder with the restrictive scope' do
expect(SnippetsFinder).to receive(:new).with(user, {}).and_call_original
subject
end
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