diff options
Diffstat (limited to 'app/workers')
-rw-r--r-- | app/workers/namespaceless_project_destroy_worker.rb | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/app/workers/namespaceless_project_destroy_worker.rb b/app/workers/namespaceless_project_destroy_worker.rb index da02084c688..bfae0c77700 100644 --- a/app/workers/namespaceless_project_destroy_worker.rb +++ b/app/workers/namespaceless_project_destroy_worker.rb @@ -12,7 +12,7 @@ class NamespacelessProjectDestroyWorker Sidekiq::Client.push_bulk('class' => self, 'queue' => sidekiq_options['queue'], 'args' => args_list) end - def perform(project_id, user_id, params) + def perform(project_id) begin project = Project.unscoped.find(project_id) rescue ActiveRecord::RecordNotFound @@ -20,9 +20,6 @@ class NamespacelessProjectDestroyWorker end return unless project.namespace_id.nil? # Reject doing anything for projects that *do* have a namespace - user = User.find(user_id) - return unless user.can?(:remove_project, project) - project.team.truncate unlink_fork(project) if project.forked? |