diff --git a/app/models/concerns/participable.rb b/app/models/concerns/participable.rb index 1663aa6c88691979c1eced7b4a82deea48e537c7..20743ebcb522d1dda6756b28f366f0403b976839 100644 --- a/app/models/concerns/participable.rb +++ b/app/models/concerns/participable.rb @@ -64,8 +64,6 @@ module Participable # # Returns an Array of User instances. def visible_participants(user) - return participants(user) unless Feature.enabled?(:verify_participants_access, project, default_enabled: :yaml) - filter_by_ability(raw_participants(user, verify_access: true)) end diff --git a/config/feature_flags/development/verify_participants_access.yml b/config/feature_flags/development/verify_participants_access.yml deleted file mode 100644 index 8857003fd479762eef50c10abecc3d5008d9a11e..0000000000000000000000000000000000000000 --- a/config/feature_flags/development/verify_participants_access.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- -name: verify_participants_access -introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/74906 -rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/347407 -milestone: '14.6' -type: development -group: group::source code -default_enabled: false diff --git a/spec/models/concerns/participable_spec.rb b/spec/models/concerns/participable_spec.rb index 50cf7377b995ce7f86adc4600b6743c780b1bc33..99a3a0fb79a7db38005ad4419051bbd9431bc9ea 100644 --- a/spec/models/concerns/participable_spec.rb +++ b/spec/models/concerns/participable_spec.rb @@ -138,7 +138,7 @@ RSpec.describe Participable do allow(instance).to receive_message_chain(:model_name, :element) { 'class' } expect(instance).to receive(:foo).and_return(user2) expect(instance).to receive(:bar).and_return(user3) - expect(instance).to receive(:project).thrice.and_return(project) + expect(instance).to receive(:project).twice.and_return(project) participants = instance.visible_participants(user1) @@ -159,31 +159,10 @@ RSpec.describe Participable do allow(instance).to receive_message_chain(:model_name, :element) { 'class' } allow(instance).to receive(:bar).and_return(user2) - expect(instance).to receive(:project).thrice.and_return(project) + expect(instance).to receive(:project).twice.and_return(project) expect(instance.visible_participants(user1)).to be_empty end - - context 'when feature flag is disabled' do - before do - stub_feature_flags(verify_participants_access: false) - end - - it 'returns unavailable participants' do - model.participant(:bar) - - instance = model.new - user1 = build(:user) - user2 = build(:user) - project = build(:project, :public) - - allow(instance).to receive_message_chain(:model_name, :element) { 'class' } - allow(instance).to receive(:bar).and_return(user2) - expect(instance).to receive(:project).thrice.and_return(project) - - expect(instance.visible_participants(user1)).to match_array([user2]) - end - end end end