diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-09-20 15:11:03 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-09-20 15:11:03 +0300 |
commit | 027f19b39c73b3b98e7cf305fead871626e8b717 (patch) | |
tree | d97ff241c76a5655f8f58444ccf76695b1b89bcf /app/services/authorized_project_update | |
parent | a7b422860c90eecd1b98845d234a8347686fbdcf (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/services/authorized_project_update')
-rw-r--r-- | app/services/authorized_project_update/project_recalculate_service.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/app/services/authorized_project_update/project_recalculate_service.rb b/app/services/authorized_project_update/project_recalculate_service.rb index e0b8158417c..8d60fffd959 100644 --- a/app/services/authorized_project_update/project_recalculate_service.rb +++ b/app/services/authorized_project_update/project_recalculate_service.rb @@ -64,7 +64,12 @@ module AuthorizedProjectUpdate end def refresh_authorizations - project.remove_project_authorizations(user_ids_to_remove) if user_ids_to_remove.any? + if user_ids_to_remove.any? + ProjectAuthorization.delete_all_in_batches_for_project( + project: project, + user_ids: user_ids_to_remove) + end + ProjectAuthorization.insert_all_in_batches(authorizations_to_create) if authorizations_to_create.any? end |