gitlab-org--gitlab-foss/lib/constraints/user_url_constrainer.rb
2017-05-05 12:11:57 -07:00

5 lines
154 B
Ruby

class UserUrlConstrainer
def matches?(request)
User.find_by_full_path(request.params[:username], follow_redirects: request.get?).present?
end
end