summaryrefslogtreecommitdiff
path: root/lib/constraints
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2017-08-09 12:41:20 +0000
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2017-08-09 12:41:20 +0000
commitec2d6b495ba6f7de953729d844803d93d7d38c48 (patch)
tree9889a93c24f9946ab39e23162929381468d7e1ea /lib/constraints
parent22c02bc22aff28150d6f8acb9b789ca25fc2ed11 (diff)
downloadgitlab-ce-ec2d6b495ba6f7de953729d844803d93d7d38c48.tar.gz
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