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/workers/gitlab_shell_worker.rb')
-rw-r--r--app/workers/gitlab_shell_worker.rb12
1 files changed, 3 insertions, 9 deletions
diff --git a/app/workers/gitlab_shell_worker.rb b/app/workers/gitlab_shell_worker.rb
index 1bcaf5a42be..2f396dcdb86 100644
--- a/app/workers/gitlab_shell_worker.rb
+++ b/app/workers/gitlab_shell_worker.rb
@@ -14,18 +14,12 @@ class GitlabShellWorker # rubocop:disable Scalability/IdempotentWorker
loggable_arguments 0
def perform(action, *arg)
- # Gitlab::Shell is being removed but we need to continue to process jobs
- # enqueued in the previous release, so handle them here.
- #
- # See https://gitlab.com/gitlab-org/gitlab/-/issues/25095 for more details
- if AuthorizedKeysWorker::PERMITTED_ACTIONS.include?(action.to_s)
- AuthorizedKeysWorker.new.perform(action, *arg)
-
- return
+ if ::Feature.enabled?(:verify_gitlab_shell_worker_method_names) && Gitlab::Shell::PERMITTED_ACTIONS.exclude?(action)
+ raise(ArgumentError, "#{action} not allowed for #{self.class.name}")
end
Gitlab::GitalyClient::NamespaceService.allow do
- gitlab_shell.__send__(action, *arg) # rubocop:disable GitlabSecurity/PublicSend
+ gitlab_shell.public_send(action, *arg) # rubocop:disable GitlabSecurity/PublicSend
end
end
end