FIX: allows the selection of the default landing tab

This commit is contained in:
Régis Hanol
2013-03-28 14:01:13 +01:00
parent 36e950ee07
commit 1668b5eab2
8 changed files with 81 additions and 88 deletions

View File

@ -0,0 +1,10 @@
class HomePageConstraint
def initialize(filter)
@filter = filter
end
def matches?(request)
homepage = request.session[:current_user_id].present? ? SiteSetting.homepage : SiteSetting.anonymous_homepage
homepage == @filter
end
end