Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/services/todos/destroy/base_service.rb')
-rw-r--r--app/services/todos/destroy/base_service.rb31
1 files changed, 0 insertions, 31 deletions
diff --git a/app/services/todos/destroy/base_service.rb b/app/services/todos/destroy/base_service.rb
index ed5c4df85b1..c9c86330e1c 100644
--- a/app/services/todos/destroy/base_service.rb
+++ b/app/services/todos/destroy/base_service.rb
@@ -4,37 +4,6 @@ module Todos
module Destroy
class BaseService
def execute
- return unless todos_to_remove?
-
- ::Gitlab::Database.allow_cross_joins_across_databases(url:
- 'https://gitlab.com/gitlab-org/gitlab/-/issues/422045') do
- without_authorized(todos).delete_all
- end
- end
-
- private
-
- # rubocop: disable CodeReuse/ActiveRecord
- def without_authorized(items)
- items.where.not('todos.user_id' => authorized_users)
- end
- # rubocop: enable CodeReuse/ActiveRecord
-
- # rubocop: disable CodeReuse/ActiveRecord
- def authorized_users
- ProjectAuthorization.select(:user_id).where(project_id: project_ids)
- end
- # rubocop: enable CodeReuse/ActiveRecord
-
- def todos
- raise NotImplementedError
- end
-
- def project_ids
- raise NotImplementedError
- end
-
- def todos_to_remove?
raise NotImplementedError
end
end