mirror of
https://github.com/discourse/discourse.git
synced 2024-11-27 08:03:40 +08:00
FIX: show 404 page when user is logged out and navigates to private message
This commit is contained in:
parent
9f8d6b6088
commit
106cb9874a
|
@ -86,13 +86,11 @@ class ApplicationController < ActionController::Base
|
|||
|
||||
rescue_from Discourse::NotLoggedIn do |e|
|
||||
raise e if Rails.env.test?
|
||||
|
||||
if (request.format && request.format.json?) || request.xhr? || !request.get?
|
||||
rescue_discourse_actions(:not_logged_in, 403, true)
|
||||
else
|
||||
redirect_to path("/")
|
||||
rescue_discourse_actions(:not_found, 404)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
rescue_from Discourse::NotFound do
|
||||
|
|
Loading…
Reference in New Issue
Block a user