Skip to content
Snippets Groups Projects
Verified Commit e9a32751 authored by Schmil Monderer's avatar Schmil Monderer
Browse files

Remove allow_cross_joins_across_databases

Changelog: changed
EE: true
parent 13f4aca3
No related branches found
No related tags found
2 merge requests!170053Security patch upgrade alert: Only expose to admins 17-4,!165941Resolve "Resolve cross DB transaction for dast_profiles with dast_scanner_profile and dast_site_profile tables"
......@@ -9,13 +9,9 @@ def execute
return error(_('Invalid tags')) unless valid_tags?
Gitlab::Database::QueryAnalyzers::PreventCrossDatabaseModification
.allow_cross_database_modification_within_transaction(
url: 'https://gitlab.com/gitlab-org/gitlab/-/issues/483010') do
ApplicationRecord.transaction do
@dast_profile = create_profile
@schedule = create_schedule(@dast_profile) if params.dig(:dast_profile_schedule, :active)
end
ApplicationRecord.transaction do
@dast_profile = create_profile
@schedule = create_schedule(@dast_profile) if params.dig(:dast_profile_schedule, :active)
end
create_audit_event(@dast_profile, @schedule)
......
......@@ -15,19 +15,15 @@ def execute
build_auditors!
Gitlab::Database::QueryAnalyzers::PreventCrossDatabaseModification
.allow_cross_database_modification_within_transaction(
url: 'https://gitlab.com/gitlab-org/gitlab/-/issues/483010') do
ApplicationRecord.transaction do
dast_profile.update!(update_params)
if tag_list?
dast_profile.profile_runner_tags.delete_all(:delete_all)
tags.each { |tag| dast_profile.profile_runner_tags.create!(tag: tag) }
end
update_or_create_schedule! if schedule_input_params
ApplicationRecord.transaction do
dast_profile.update!(update_params)
if tag_list?
dast_profile.profile_runner_tags.delete_all(:delete_all)
tags.each { |tag| dast_profile.profile_runner_tags.create!(tag: tag) }
end
update_or_create_schedule! if schedule_input_params
end
execute_auditors!
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment