Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2017-08-09 15:41:20 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2017-08-09 15:41:20 +0300
commitec2d6b495ba6f7de953729d844803d93d7d38c48 (patch)
tree9889a93c24f9946ab39e23162929381468d7e1ea /lib/constraints
parent22c02bc22aff28150d6f8acb9b789ca25fc2ed11 (diff)
Explain why we use select all for project_url_constrainer.rb
Diffstat (limited to 'lib/constraints')
-rw-r--r--lib/constraints/project_url_constrainer.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/constraints/project_url_constrainer.rb b/lib/constraints/project_url_constrainer.rb
index 4c0aee6c48f..fd7b97d3167 100644
--- a/lib/constraints/project_url_constrainer.rb
+++ b/lib/constraints/project_url_constrainer.rb
@@ -6,6 +6,8 @@ class ProjectUrlConstrainer
return false unless DynamicPathValidator.valid_project_path?(full_path)
+ # We intentionally allow SELECT(*) here so result of this query can be used
+ # as cache for further Project.find_by_full_path calls within request
Project.find_by_full_path(full_path, follow_redirects: request.get?).present?
end
end