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:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-10-27 13:15:59 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-10-27 13:16:27 +0300
commiteff560cfb9a337623d25b912d9bb233fae25fbf1 (patch)
treedd96ba1b42ddc1cdc588c0ff4096a4d47d0b5e0d /app/services
parent14b92217e768aa4f3ce2d8b30f2c2acbdfdd8f6a (diff)
Add latest changes from gitlab-org/security/gitlab@14-4-stable-ee
Diffstat (limited to 'app/services')
-rw-r--r--app/services/groups/transfer_service.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/app/services/groups/transfer_service.rb b/app/services/groups/transfer_service.rb
index 774f81b0a5e..334083a859f 100644
--- a/app/services/groups/transfer_service.rb
+++ b/app/services/groups/transfer_service.rb
@@ -182,6 +182,14 @@ module Groups
# schedule refreshing projects for all the members of the group
@group.refresh_members_authorized_projects
+
+ # When a group is transferred, it also affects who gets access to the projects shared to
+ # the subgroups within its hierarchy, so we also schedule jobs that refresh authorizations for all such shared projects.
+ project_group_shares_within_the_hierarchy = ProjectGroupLink.in_group(group.self_and_descendants.select(:id))
+
+ project_group_shares_within_the_hierarchy.find_each do |project_group_link|
+ AuthorizedProjectUpdate::ProjectRecalculateWorker.perform_async(project_group_link.project_id)
+ end
end
def raise_transfer_error(message)