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

9 lines
220 B
Ruby

class GroupUrlConstrainer
def matches?(request)
id = request.params[:id]
return false unless DynamicPathValidator.valid?(id)
Group.find_by_full_path(id, follow_redirects: request.get?).present?
end
end