diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2016-10-06 16:59:22 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2016-10-06 19:50:48 +0300 |
commit | 42c6555bab47eb042749be1f24d486797eb8d8ee (patch) | |
tree | 2931584b6ce06de3162f0b43aca5ceefd17a3f7c /lib/constraints | |
parent | 105260314899303de4c70a1125b5ab69fb50e6d9 (diff) | |
download | gitlab-ce-42c6555bab47eb042749be1f24d486797eb8d8ee.tar.gz |
Make user constrainer lookup same as controller and add more constrainer tests
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'lib/constraints')
-rw-r--r-- | lib/constraints/user_url_constrainer.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/constraints/user_url_constrainer.rb b/lib/constraints/user_url_constrainer.rb index ef38d47d5c6..504a0f5d93e 100644 --- a/lib/constraints/user_url_constrainer.rb +++ b/lib/constraints/user_url_constrainer.rb @@ -2,6 +2,6 @@ require 'constraints/namespace_url_constrainer' class UserUrlConstrainer < NamespaceUrlConstrainer def find_resource(id) - User.find_by_username(id) + User.find_by('lower(username) = ?', id.downcase) end end |