summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean McGivern <sean@mcgivern.me.uk>2017-08-09 13:48:55 +0000
committerSean McGivern <sean@mcgivern.me.uk>2017-08-09 13:48:55 +0000
commit705dbe6162017b20020c202194fabaeb475e4187 (patch)
tree6a8d362c5a192107005f07c11fd418ab0eaba987
parenta281b1e17ea2b3dc819d64fe32815626270499d2 (diff)
parentec2d6b495ba6f7de953729d844803d93d7d38c48 (diff)
downloadgitlab-ce-705dbe6162017b20020c202194fabaeb475e4187.tar.gz
Merge branch 'dz-clarify-constrainer-query' into 'master'
Explain why we use select all for project_url_constrainer.rb See merge request !13425
-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