tap/app/constraints/user_homepage_constraint.rb

6 lines
132 B
Ruby
Raw Normal View History

2015-01-09 12:12:19 +00:00
class UserHomepageConstraint < Struct.new(:role)
def matches?(request)
role == request.env['warden'].user.koelkast?
end
end