debian-mirror-gitlab/lib/constraints/user_url_constrainer.rb

8 lines
187 B
Ruby
Raw Normal View History

2016-11-03 12:29:30 +05:30
require 'constraints/namespace_url_constrainer'
class UserUrlConstrainer < NamespaceUrlConstrainer
def find_resource(id)
User.find_by('lower(username) = ?', id.downcase)
end
end