summaryrefslogtreecommitdiff
path: root/lib/constraints/group_url_constrainer.rb
diff options
context:
space:
mode:
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 6fc1d56d7a0..0ea2f97352d 100644
--- a/lib/constraints/group_url_constrainer.rb
+++ b/lib/constraints/group_url_constrainer.rb
@@ -1,9 +1,9 @@
class GroupUrlConstrainer
def matches?(request)
- full_path = request.params[:group_id] || request.params[:id]
+ id = request.params[:group_id] || request.params[:id]
- return false unless DynamicPathValidator.valid_group_path?(full_path)
+ return false unless DynamicPathValidator.valid_namespace_path?(id)
- Group.find_by_full_path(full_path, follow_redirects: request.get?).present?
+ Group.find_by_full_path(id, follow_redirects: request.get?).present?
end
end