tap/app/constraints/user_homepage_constraint.rb
2015-01-09 13:12:19 +01:00

5 lines
132 B
Ruby

class UserHomepageConstraint < Struct.new(:role)
def matches?(request)
role == request.env['warden'].user.koelkast?
end
end