Commit 21388c5b authored by Dylan Griffith's avatar Dylan Griffith

Merge branch '342120-remove-feature-flag-member_destroy_async_auth_refresh' into 'master'

Remove feature flag: member_destroy_async_auth_refresh

See merge request gitlab-org/gitlab!72338
parents a6101523 edde4d7f
...@@ -188,7 +188,7 @@ class Member < ApplicationRecord ...@@ -188,7 +188,7 @@ class Member < ApplicationRecord
end end
after_commit on: [:destroy], unless: :importing? do after_commit on: [:destroy], unless: :importing? do
refresh_member_authorized_projects(blocking: Feature.disabled?(:member_destroy_async_auth_refresh, type: :ops)) refresh_member_authorized_projects(blocking: false)
end end
default_value_for :notification_level, NotificationSetting.levels[:global] default_value_for :notification_level, NotificationSetting.levels[:global]
......
---
name: member_destroy_async_auth_refresh
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/66424
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/342120
milestone: '14.4'
type: ops
group: group::access
default_enabled: false
...@@ -180,12 +180,11 @@ RSpec.describe AppSec::Dast::Profiles::UpdateService do ...@@ -180,12 +180,11 @@ RSpec.describe AppSec::Dast::Profiles::UpdateService do
context 'when the owner was removed from the project' do context 'when the owner was removed from the project' do
before do before do
stub_feature_flags(member_destroy_async_auth_refresh: false)
project.team.truncate project.team.truncate
project.add_developer(user) project.add_developer(user)
end end
it 'updates the schedule owner' do it 'updates the schedule owner', :sidekiq_inline do
subject subject
expect(dast_profile_schedule.user_id).to eq(user.id) expect(dast_profile_schedule.user_id).to eq(user.id)
......
...@@ -244,32 +244,17 @@ RSpec.describe ProjectMember do ...@@ -244,32 +244,17 @@ RSpec.describe ProjectMember do
project.add_user(user, Gitlab::Access::GUEST) project.add_user(user, Gitlab::Access::GUEST)
end end
context 'when :member_destroy_async_auth_refresh feature flag is enabled' do it 'changes access level', :sidekiq_inline do
it 'changes access level', :sidekiq_inline do expect { action }.to change { user.can?(:guest_access, project) }.from(true).to(false)
expect { action }.to change { user.can?(:guest_access, project) }.from(true).to(false)
end
it 'calls AuthorizedProjectUpdate::ProjectRecalculatePerUserWorker to recalculate authorizations' do
expect(AuthorizedProjectUpdate::ProjectRecalculatePerUserWorker).to receive(:perform_async).with(project.id, user.id)
action
end
it_behaves_like 'calls AuthorizedProjectUpdate::UserRefreshFromReplicaWorker with a delay to update project authorizations'
end end
context 'when :member_destroy_async_auth_refresh feature flag is disabled' do it 'calls AuthorizedProjectUpdate::ProjectRecalculatePerUserWorker to recalculate authorizations' do
before do expect(AuthorizedProjectUpdate::ProjectRecalculatePerUserWorker).to receive(:perform_async).with(project.id, user.id)
stub_feature_flags(member_destroy_async_auth_refresh: false)
end
it 'changes access level' do
expect { action }.to change { user.can?(:guest_access, project) }.from(true).to(false)
end
it_behaves_like 'calls AuthorizedProjectUpdate::ProjectRecalculatePerUserService to recalculate authorizations' action
it_behaves_like 'calls AuthorizedProjectUpdate::UserRefreshFromReplicaWorker with a delay to update project authorizations'
end end
it_behaves_like 'calls AuthorizedProjectUpdate::UserRefreshFromReplicaWorker with a delay to update project authorizations'
end end
context 'when the feature flag `specialized_service_for_project_member_auth_refresh` is disabled' do context 'when the feature flag `specialized_service_for_project_member_auth_refresh` is disabled' 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