Commit 1a614fb8 authored by Thong Kuah's avatar Thong Kuah

Allowlist another cross-database query callsite

parent 6073309b
...@@ -29,17 +29,19 @@ module Ci ...@@ -29,17 +29,19 @@ module Ci
# Fetch all pipelines without permission check. # Fetch all pipelines without permission check.
def all def all
strong_memoize(:all_pipelines) do ::Gitlab::Database.allow_cross_joins_across_databases(url: 'https://gitlab.com/gitlab-org/gitlab/-/issues/336891') do
next Ci::Pipeline.none unless source_project strong_memoize(:all_pipelines) do
next Ci::Pipeline.none unless source_project
pipelines =
if merge_request.persisted? pipelines =
pipelines_using_cte if merge_request.persisted?
else pipelines_using_cte
triggered_for_branch.for_sha(commit_shas) else
end triggered_for_branch.for_sha(commit_shas)
end
sort(pipelines)
sort(pipelines)
end
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment