summaryrefslogtreecommitdiff
path: root/lib/constraints
diff options
context:
space:
mode:
authorMarcia Ramos <virtua.creative@gmail.com>2017-08-15 11:20:11 -0300
committerMarcia Ramos <virtua.creative@gmail.com>2017-08-15 11:20:11 -0300
commit35c9a75eff464ff7bb0e58c67488a6fa1bdebaaa (patch)
treeb78097fd10cad31f45b8b6613d45960f2872802c /lib/constraints
parent0112d13314e1aea350c7dacc02c0f1c527566809 (diff)
parentfe09c25d68a61c5874e9beb0f018c05a4d789d70 (diff)
downloadgitlab-ce-docs-topic-permissions.tar.gz
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