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/authorized_project_update/project_group_link_create_worker.rb')
-rw-r--r--app/workers/authorized_project_update/project_group_link_create_worker.rb21
1 files changed, 21 insertions, 0 deletions
diff --git a/app/workers/authorized_project_update/project_group_link_create_worker.rb b/app/workers/authorized_project_update/project_group_link_create_worker.rb
new file mode 100644
index 00000000000..5fb59efaacb
--- /dev/null
+++ b/app/workers/authorized_project_update/project_group_link_create_worker.rb
@@ -0,0 +1,21 @@
+# frozen_string_literal: true
+
+module AuthorizedProjectUpdate
+ class ProjectGroupLinkCreateWorker
+ include ApplicationWorker
+
+ feature_category :authentication_and_authorization
+ urgency :low
+ queue_namespace :authorized_project_update
+
+ idempotent!
+
+ def perform(project_id, group_id)
+ project = Project.find(project_id)
+ group = Group.find(group_id)
+
+ AuthorizedProjectUpdate::ProjectGroupLinkCreateService.new(project, group)
+ .execute
+ end
+ end
+end