tap/app/constraints/user_homepage_constraint.rb

6 lines
132 B
Ruby
Raw Normal View History

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