summaryrefslogtreecommitdiff
path: root/lib/constraints/group_url_constrainer.rb
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2017-05-24 20:59:26 +0000
committerDouwe Maan <douwe@gitlab.com>2017-05-24 20:59:26 +0000
commit43b1750892369d579edc7cd4e4ea1f7ac8667e34 (patch)
tree694921527f2697a38d478abcb585e0297951232b /lib/constraints/group_url_constrainer.rb
parentc846a8329ab24b551c1e6cc899434c0802769137 (diff)
downloadgitlab-ce-43b1750892369d579edc7cd4e4ea1f7ac8667e34.tar.gz
Revert "Remove changes that are not absolutely necessary"
This reverts commit b0498c176fa134761d899c9b369be12f1ca789c5
Diffstat (limited to 'lib/constraints/group_url_constrainer.rb')
-rw-r--r--lib/constraints/group_url_constrainer.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/constraints/group_url_constrainer.rb b/lib/constraints/group_url_constrainer.rb
index 0ea2f97352d..6fc1d56d7a0 100644
--- a/lib/constraints/group_url_constrainer.rb
+++ b/lib/constraints/group_url_constrainer.rb
@@ -1,9 +1,9 @@
class GroupUrlConstrainer
def matches?(request)
- id = request.params[:group_id] || request.params[:id]
+ full_path = request.params[:group_id] || request.params[:id]
- return false unless DynamicPathValidator.valid_namespace_path?(id)
+ return false unless DynamicPathValidator.valid_group_path?(full_path)
- Group.find_by_full_path(id, follow_redirects: request.get?).present?
+ Group.find_by_full_path(full_path, follow_redirects: request.get?).present?
end
end