2016-11-07 08:16:04 -05:00
|
|
|
class GroupUrlConstrainer
|
|
|
|
def matches?(request)
|
2016-11-14 09:55:31 -05:00
|
|
|
id = request.params[:id]
|
|
|
|
|
2017-04-18 10:27:11 -04:00
|
|
|
return false unless DynamicPathValidator.valid?(id)
|
2016-11-14 09:55:31 -05:00
|
|
|
|
2017-05-01 16:46:30 -04:00
|
|
|
Group.find_by_full_path(id, follow_redirects: request.get?).present?
|
2016-11-14 09:55:31 -05:00
|
|
|
end
|
2016-10-06 08:14:24 -04:00
|
|
|
end
|