diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-10-27 10:15:59 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-10-27 10:16:27 +0000 |
commit | eff560cfb9a337623d25b912d9bb233fae25fbf1 (patch) | |
tree | dd96ba1b42ddc1cdc588c0ff4096a4d47d0b5e0d /app/services | |
parent | 14b92217e768aa4f3ce2d8b30f2c2acbdfdd8f6a (diff) | |
download | gitlab-ce-eff560cfb9a337623d25b912d9bb233fae25fbf1.tar.gz |
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.rb | 8 |
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) |