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
1 changed files with 2 additions and 0 deletions

View File

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