diff options
author | Sean McGivern <sean@mcgivern.me.uk> | 2017-08-09 13:48:55 +0000 |
---|---|---|
committer | Sean McGivern <sean@mcgivern.me.uk> | 2017-08-09 13:48:55 +0000 |
commit | 705dbe6162017b20020c202194fabaeb475e4187 (patch) | |
tree | 6a8d362c5a192107005f07c11fd418ab0eaba987 | |
parent | a281b1e17ea2b3dc819d64fe32815626270499d2 (diff) | |
parent | ec2d6b495ba6f7de953729d844803d93d7d38c48 (diff) | |
download | gitlab-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.rb | 2 |
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 |