2013-03-28 09:01:13 -04:00
|
|
|
class HomePageConstraint
|
|
|
|
def initialize(filter)
|
|
|
|
@filter = filter
|
|
|
|
end
|
|
|
|
|
|
|
|
def matches?(request)
|
2013-10-09 00:10:37 -04:00
|
|
|
provider = Discourse.current_user_provider.new(request.env)
|
|
|
|
homepage = provider.current_user ? SiteSetting.homepage : SiteSetting.anonymous_homepage
|
2013-03-28 09:01:13 -04:00
|
|
|
homepage == @filter
|
|
|
|
end
|
2013-10-09 00:10:37 -04:00
|
|
|
end
|