Commit b1ee5538 authored by Jan Provaznik's avatar Jan Provaznik

Remove skip_epic_count_visibility_check flag

parent 1e4701d6
......@@ -203,7 +203,7 @@ class EpicsFinder < IssuableFinder
end
def can_read_all_epics_in_related_groups?(groups)
return true if skip_visibility_check?
return true if @skip_visibility_check
return false unless current_user
# If a user is a member of a group, he also inherits access to all subgroups,
......@@ -220,10 +220,6 @@ class EpicsFinder < IssuableFinder
Ability.allowed?(current_user, :read_confidential_epic, parent)
end
def skip_visibility_check?
@skip_visibility_check && Feature.enabled?(:skip_epic_count_visibility_check, group, default_enabled: true)
end
def by_confidential(items)
return items if params[:confidential].nil?
......
......@@ -338,16 +338,6 @@ RSpec.describe EpicsFinder do
it 'returns all epics' do
expect(subject).to match_array([base_epic1, base_epic2, private_epic1, private_epic2, public_epic1, public_epic2])
end
context 'when skip_epic_count_visibility_check is disabled' do
before do
stub_feature_flags(skip_epic_count_visibility_check: false)
end
it 'returns only public epics' do
expect(subject).to match_array([base_epic2, public_epic1])
end
end
end
context 'when user is member of ancestor group' 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