diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-03-16 21:18:33 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-03-16 21:18:33 +0300 |
commit | f64a639bcfa1fc2bc89ca7db268f594306edfd7c (patch) | |
tree | a2c3c2ebcc3b45e596949db485d6ed18ffaacfa1 /app/services/groups | |
parent | bfbc3e0d6583ea1a91f627528bedc3d65ba4b10f (diff) |
Add latest changes from gitlab-org/gitlab@13-10-stable-eev13.10.0-rc40
Diffstat (limited to 'app/services/groups')
-rw-r--r-- | app/services/groups/create_service.rb | 2 | ||||
-rw-r--r-- | app/services/groups/destroy_service.rb | 4 | ||||
-rw-r--r-- | app/services/groups/group_links/create_service.rb | 2 | ||||
-rw-r--r-- | app/services/groups/group_links/destroy_service.rb | 2 | ||||
-rw-r--r-- | app/services/groups/group_links/update_service.rb | 2 |
5 files changed, 6 insertions, 6 deletions
diff --git a/app/services/groups/create_service.rb b/app/services/groups/create_service.rb index 06a3b31c665..3ead2323588 100644 --- a/app/services/groups/create_service.rb +++ b/app/services/groups/create_service.rb @@ -33,7 +33,7 @@ module Groups Group.transaction do if @group.save @group.add_owner(current_user) - @group.create_namespace_settings + @group.create_namespace_settings unless @group.namespace_settings Service.create_from_active_default_integrations(@group, :group_id) OnboardingProgress.onboard(@group) end diff --git a/app/services/groups/destroy_service.rb b/app/services/groups/destroy_service.rb index c7107e2fa56..a27330d1104 100644 --- a/app/services/groups/destroy_service.rb +++ b/app/services/groups/destroy_service.rb @@ -31,11 +31,11 @@ module Groups # If any other groups are shared with the group that is being destroyed, # we should specifically trigger update of all project authorizations - # for users that are the members of this group. + # for users that are the direct members of this group. # If not, the project authorization records of these users to projects within the shared groups # will never be removed, causing inconsistencies with access permissions. if any_other_groups_are_shared_with_this_group? - user_ids_for_project_authorizations_refresh = group.user_ids_for_project_authorizations + user_ids_for_project_authorizations_refresh = group.users_ids_of_direct_members end group.destroy diff --git a/app/services/groups/group_links/create_service.rb b/app/services/groups/group_links/create_service.rb index 589ac7ccde7..57c746c3841 100644 --- a/app/services/groups/group_links/create_service.rb +++ b/app/services/groups/group_links/create_service.rb @@ -18,7 +18,7 @@ module Groups ) if link.save - group.refresh_members_authorized_projects + group.refresh_members_authorized_projects(direct_members_only: true) success(link: link) else error(link.errors.full_messages.to_sentence, 409) diff --git a/app/services/groups/group_links/destroy_service.rb b/app/services/groups/group_links/destroy_service.rb index b0d496ae78c..05504a80f46 100644 --- a/app/services/groups/group_links/destroy_service.rb +++ b/app/services/groups/group_links/destroy_service.rb @@ -16,7 +16,7 @@ module Groups groups_to_refresh = links.map(&:shared_with_group) groups_to_refresh.uniq.each do |group| - group.refresh_members_authorized_projects + group.refresh_members_authorized_projects(direct_members_only: true) end else Gitlab::AppLogger.info( diff --git a/app/services/groups/group_links/update_service.rb b/app/services/groups/group_links/update_service.rb index 71b52cb616c..3703d535482 100644 --- a/app/services/groups/group_links/update_service.rb +++ b/app/services/groups/group_links/update_service.rb @@ -13,7 +13,7 @@ module Groups group_link.update!(group_link_params) if requires_authorization_refresh?(group_link_params) - group_link.shared_with_group.refresh_members_authorized_projects + group_link.shared_with_group.refresh_members_authorized_projects(direct_members_only: true) end end |