FIX: Suppress error when acccess is invalid.

This commit is contained in:
Guo Xiang Tan 2017-01-06 13:18:04 +08:00
parent 389e1d0bd5
commit 1cb09aec49

View File

@ -9,5 +9,7 @@ class HomePageConstraint
provider = Discourse.current_user_provider.new(request.env) provider = Discourse.current_user_provider.new(request.env)
homepage = provider.current_user ? SiteSetting.homepage : SiteSetting.anonymous_homepage homepage = provider.current_user ? SiteSetting.homepage : SiteSetting.anonymous_homepage
homepage == @filter homepage == @filter
rescue Discourse::InvalidAccess
false
end end
end end