Commit 560ebc35 authored by Jan Provaznik's avatar Jan Provaznik

Enable filtering of confidential epics

Filter out confidential epics which user has not access to.
parent e490bbd5
......@@ -179,7 +179,6 @@ class EpicsFinder < IssuableFinder
# rubocop: enable CodeReuse/ActiveRecord
def with_confidentiality_access_check(epics, groups)
return epics unless Feature.enabled?(:confidential_epics_query, group)
return epics if can_read_all_epics_in_related_groups?(groups)
epics.not_confidential_or_in_groups(groups_with_confidential_access(groups))
......
......@@ -370,16 +370,6 @@ RSpec.describe EpicsFinder do
expect(subject).to match_array([base_epic2, public_epic1, public_epic2])
end
end
context 'when confidential_epics_query is disabled' do
before do
stub_feature_flags(confidential_epics_query: false)
end
it 'returns also confidential epics' do
expect(subject).to match_array([base_epic1, base_epic2, public_epic1, public_epic2])
end
end
end
context 'with negated labels' 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