diff options
Diffstat (limited to 'lib/constraints/group_url_constrainer.rb')
-rw-r--r-- | lib/constraints/group_url_constrainer.rb | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/lib/constraints/group_url_constrainer.rb b/lib/constraints/group_url_constrainer.rb index bae4db1ca4d..559f510944a 100644 --- a/lib/constraints/group_url_constrainer.rb +++ b/lib/constraints/group_url_constrainer.rb @@ -2,16 +2,8 @@ class GroupUrlConstrainer def matches?(request) id = request.params[:id] - return false unless valid?(id) + return false unless NamespaceValidator.valid_full_path?(id) Group.find_by_full_path(id).present? end - - private - - def valid?(id) - id.split('/').all? do |namespace| - NamespaceValidator.valid?(namespace) - end - end end |