mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 22:43:33 +08:00
FIX: allows the selection of the default landing tab
This commit is contained in:
10
lib/homepage_constraint.rb
Normal file
10
lib/homepage_constraint.rb
Normal 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
|
Reference in New Issue
Block a user