Skip to content
代码片段 群组 项目
未验证 提交 f0f06b50 编辑于 作者: Rodrigo Tomonari's avatar Rodrigo Tomonari 提交者: GitLab
浏览文件

Remove importer_user_mapping FF check from controller and job

The endpoints users use to accept or reject user mapping can't be behind
the actor-based importer_user_mapping feature flag because we don't
control which user group owners will reassign the contributions to.
So, these endpoints need to be available to all users.

Also the job can be enable/disable via Sidekiq Worker feature flags if
needed
上级 016b580e
No related branches found
No related tags found
无相关合并请求
......@@ -4,7 +4,6 @@ module Import
class SourceUsersController < ApplicationController
prepend_before_action :check_feature_flag!
before_action :source_user
before_action :check_source_user_valid!
respond_to :html
......@@ -53,7 +52,7 @@ def source_user
strong_memoize_attr :source_user
def check_feature_flag!
not_found unless Feature.enabled?(:importer_user_mapping, current_user)
not_found unless Feature.enabled?(:importer_user_mapping, source_user.reassigned_by_user)
end
def banner(partial)
......
......@@ -19,11 +19,6 @@ class ReassignPlaceholderUserRecordsWorker
def perform(import_source_user_id, _params = {})
@import_source_user = Import::SourceUser.find_by_id(import_source_user_id)
return unless Feature.enabled?(
:importer_user_mapping,
User.actor_from_id(import_source_user&.reassigned_by_user_id)
)
return unless import_source_user_valid?
Import::ReassignPlaceholderUserRecordsService.new(import_source_user).execute
......
......@@ -51,18 +51,6 @@
it_behaves_like 'an invalid source user'
end
context 'when the feature flag is disabled' do
before do
stub_feature_flags(importer_user_mapping: false)
end
it 'does not enqueue service to map records to real users' do
expect(Import::ReassignPlaceholderUserRecordsService).not_to receive(:new)
perform_multiple(job_args)
end
end
it 'queues a DeletePlaceholderUserWorker with the source user ID' do
expect(Import::DeletePlaceholderUserWorker)
.to receive(:perform_async).with(import_source_user.id)
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册