diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-04 15:08:40 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-04 15:08:40 +0000 |
commit | 6b833f1e0340e00fdee074da9c42c0d4e07a46d2 (patch) | |
tree | 6fc3a7a2f8a02fec8d1e7561b453d33eb4048dad /app/services | |
parent | 88a0824944720b6edaaef56376713541b9a02118 (diff) | |
download | gitlab-ce-6b833f1e0340e00fdee074da9c42c0d4e07a46d2.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/services')
4 files changed, 8 insertions, 4 deletions
diff --git a/app/services/merge_requests/delete_non_latest_diffs_service.rb b/app/services/merge_requests/delete_non_latest_diffs_service.rb index bdb7ec8a7c2..49ec3c7538c 100644 --- a/app/services/merge_requests/delete_non_latest_diffs_service.rb +++ b/app/services/merge_requests/delete_non_latest_diffs_service.rb @@ -13,7 +13,7 @@ module MergeRequests diffs.each_batch(of: BATCH_SIZE) do |relation, index| ids = relation.pluck_primary_key.map { |id| [id] } - DeleteDiffFilesWorker.bulk_perform_in(index * 5.minutes, ids) + DeleteDiffFilesWorker.bulk_perform_in(index * 5.minutes, ids) # rubocop:disable Scalability/BulkPerformWithContext end end end diff --git a/app/services/merge_requests/migrate_external_diffs_service.rb b/app/services/merge_requests/migrate_external_diffs_service.rb index 16050244637..9fa01e0a134 100644 --- a/app/services/merge_requests/migrate_external_diffs_service.rb +++ b/app/services/merge_requests/migrate_external_diffs_service.rb @@ -9,7 +9,7 @@ module MergeRequests def self.enqueue! ids = MergeRequestDiff.ids_for_external_storage_migration(limit: MAX_JOBS) - MigrateExternalDiffsWorker.bulk_perform_async(ids.map { |id| [id] }) + MigrateExternalDiffsWorker.bulk_perform_async(ids.map { |id| [id] }) # rubocop:disable Scalability/BulkPerformWithContext end def initialize(merge_request_diff) diff --git a/app/services/user_project_access_changed_service.rb b/app/services/user_project_access_changed_service.rb index 21b52944800..21d0861ac3f 100644 --- a/app/services/user_project_access_changed_service.rb +++ b/app/services/user_project_access_changed_service.rb @@ -11,7 +11,7 @@ class UserProjectAccessChangedService if blocking AuthorizedProjectsWorker.bulk_perform_and_wait(bulk_args) else - AuthorizedProjectsWorker.bulk_perform_async(bulk_args) + AuthorizedProjectsWorker.bulk_perform_async(bulk_args) # rubocop:disable Scalability/BulkPerformWithContext end end end diff --git a/app/services/users/update_service.rb b/app/services/users/update_service.rb index e7667b0ca18..57209043e3b 100644 --- a/app/services/users/update_service.rb +++ b/app/services/users/update_service.rb @@ -53,7 +53,11 @@ module Users end def discard_read_only_attributes - discard_synced_attributes + if Feature.enabled?(:ldap_readonly_attributes, default_enabled: true) + params.reject! { |key, _| @user.read_only_attribute?(key.to_sym) } + else + discard_synced_attributes + end end def discard_synced_attributes |