Commit fe44255c authored by Doug Stull's avatar Doug Stull

Merge branch 'revert-bf422ffc' into 'master'

Revert "Merge branch '228646-filter-epics-pill-count-by-visibility' into 'master'"

See merge request gitlab-org/gitlab!82728
parents 8afc60ee c31ba545
......@@ -11,7 +11,7 @@ module Groups
def relation_for_count
EpicsFinder
.new(user, group_id: group.id, state: 'opened')
.execute(skip_visibility_check: false)
.execute(skip_visibility_check: true)
end
def issuable_key
......
......@@ -10,7 +10,6 @@ RSpec.describe Groups::EpicsCountService, :use_clean_rails_memory_store_caching
subject { described_class.new(group, user) }
describe '#relation_for_count' do
context "when the user is a reporter" do
before do
group.add_reporter(user)
allow(EpicsFinder).to receive(:new).and_call_original
......@@ -25,20 +24,5 @@ RSpec.describe Groups::EpicsCountService, :use_clean_rails_memory_store_caching
end
end
context "when there are confidential epics" do
let_it_be(:epic) { create(:epic, :confidential, group: group) }
context "when the user has view access to the group and its epics" do
it "filters the count by visibility" do
allow(Ability).to receive(:allowed?).and_call_original
allow(Ability).to receive(:allowed?).with(user, :read_epic, group).and_return(true)
expect(group.epics.count).to eq(2)
expect(subject.count).to eq(1)
end
end
end
end
it_behaves_like 'a counter caching service with threshold'
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