diff options
author | Bob Van Landuyt <bob@gitlab.com> | 2017-04-12 11:28:23 +0200 |
---|---|---|
committer | Bob Van Landuyt <bob@gitlab.com> | 2017-05-01 11:14:24 +0200 |
commit | bccf8d86c57a141aeb60d96bc3139fe2b5dc9240 (patch) | |
tree | 8d9dadad95c30bef1c9f261f7804721d2198056f /lib/constraints | |
parent | 3143a5d2602de521b432231d701aedcc2844c088 (diff) | |
download | gitlab-ce-bccf8d86c57a141aeb60d96bc3139fe2b5dc9240.tar.gz |
Rename `NamespaceValidator` to `DynamicPathValidator`
This reflects better that it validates paths instead of a namespace model
Diffstat (limited to 'lib/constraints')
-rw-r--r-- | lib/constraints/group_url_constrainer.rb | 2 | ||||
-rw-r--r-- | lib/constraints/project_url_constrainer.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/constraints/group_url_constrainer.rb b/lib/constraints/group_url_constrainer.rb index 559f510944a..48a33690cb2 100644 --- a/lib/constraints/group_url_constrainer.rb +++ b/lib/constraints/group_url_constrainer.rb @@ -2,7 +2,7 @@ class GroupUrlConstrainer def matches?(request) id = request.params[:id] - return false unless NamespaceValidator.valid_full_path?(id) + return false unless DynamicPathValidator.valid_full_path?(id) Group.find_by_full_path(id).present? end diff --git a/lib/constraints/project_url_constrainer.rb b/lib/constraints/project_url_constrainer.rb index f83fa1618a5..72c457d0369 100644 --- a/lib/constraints/project_url_constrainer.rb +++ b/lib/constraints/project_url_constrainer.rb @@ -4,7 +4,7 @@ class ProjectUrlConstrainer project_path = request.params[:project_id] || request.params[:id] full_path = namespace_path + '/' + project_path - unless NamespaceValidator.valid_full_path?(full_path) + unless DynamicPathValidator.valid_full_path?(full_path) return false end |